> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/payment-method-agreements/create-an-agreement-for-a-tenant-payment-method.md).

# Create an agreement for a tenant payment method

Create an agreement for a tenant payment method.\
`name` identifies the agreement.\
`productUid` must refer to a product of type NON\_PHYSICAL. This is the product added to the order to carry the cost adjustment.\
`percentage` is given in hundredths of a percent: 250 means 2,50 %. A positive percentage gives a negative cost, and a negative percentage gives a positive cost.\
`position` is used to order the agreements when they are listed.\
`validFrom` and `validTo` are both optional; null means the agreement has no limit in that direction.\
`tenantPaymentMethodAgreementUid` is the primary key of the table. It is assigned a unique UUID but you can assign it your own ID if needed.

Required permissions: PAYMENT\_METHOD

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"PaymentMethodAgreements","description":"PaymentMethodAgreements"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"TenantPaymentMethodAgreementResponse":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPaymentMethodAgreementResponseSchema"}}}}},"schemas":{"TenantPaymentMethodAgreementResponseSchema":{"title":"TenantPaymentMethodAgreementResponseSchema","description":"An agreement configured on this payment method: a named pairing of a product with a percentage. Choosing one at payment adds a line to the order for that product, carrying a cost derived from the percentage. This response describes the configuration, so it also returns agreements that cannot currently be chosen — inactive ones, and ones outside their validity period. The product must be of type NON_PHYSICAL and must allow an order specific cost.","type":"object","properties":{"tenantPaymentMethodAgreementUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"Name of the agreement."},"productUid":{"$ref":"#/components/schemas/UID"},"percentage":{"type":"integer","description":"Percentage used to calculate the cost adjustment, given in hundredths of a percent: 250 means 2,50 %. A positive percentage gives a negative cost, and a negative percentage gives a positive cost."},"validFrom":{"type":"string","format":"date-time","nullable":true,"description":"The agreement can be used from this point in time. Null means it has no start limit."},"validTo":{"type":"string","format":"date-time","nullable":true,"description":"The agreement can be used until this point in time. Null means it has no end limit."},"position":{"type":"integer","description":"Sort order when the agreements are listed."},"active":{"type":"boolean","description":"Whether the agreement can be used. An agreement that has been used should be deactivated rather than deleted."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["tenantPaymentMethodAgreementUid","name","productUid","percentage","validFrom","validTo","position","active","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"TenantPaymentMethodAgreementCreateRequestSchema":{"title":"TenantPaymentMethodAgreementCreateRequestSchema","type":"object","properties":{"tenantPaymentMethodAgreementUid":{"$ref":"#/components/schemas/OptionalUID"},"name":{"type":"string","description":"Name of the agreement."},"productUid":{"$ref":"#/components/schemas/UID"},"percentage":{"type":"integer","description":"Percentage used to calculate the cost adjustment, given in hundredths of a percent: 250 means 2,50 %. A positive percentage gives a negative cost, and a negative percentage gives a positive cost."},"validFrom":{"type":"string","format":"date-time","nullable":true,"description":"The agreement can be used from this point in time. Omit or send null for no start limit."},"validTo":{"type":"string","format":"date-time","nullable":true,"description":"The agreement can be used until this point in time. Omit or send null for no end limit."},"position":{"type":"integer","description":"Sort order when the agreements are listed. Defaults to 0."},"active":{"type":"boolean","description":"Whether the agreement can be used. Defaults to true."}},"required":["name","productUid","percentage"]},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"requestBodies":{"TenantPaymentMethodAgreementCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPaymentMethodAgreementCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/paymentmethods/{tenantPaymentMethodUid}/agreements":{"post":{"summary":"Create an agreement for a tenant payment method","operationId":"post-tenants-paymentmethods-agreements","responses":{"201":{"$ref":"#/components/responses/TenantPaymentMethodAgreementResponse"}},"description":"Create an agreement for a tenant payment method.  \n`name` identifies the agreement.  \n`productUid` must refer to a product of type NON_PHYSICAL. This is the product\nadded to the order to carry the cost adjustment.  \n`percentage` is given in hundredths of a percent: 250 means 2,50 %. A positive\npercentage gives a negative cost, and a negative percentage gives a positive cost.  \n`position` is used to order the agreements when they are listed.  \n`validFrom` and `validTo` are both optional; null means the agreement has no limit\nin that direction.  \n`tenantPaymentMethodAgreementUid` is the primary key of the table. It is assigned\na unique UUID but you can assign it your own ID if needed.\n\nRequired permissions: PAYMENT_METHOD","requestBody":{"$ref":"#/components/requestBodies/TenantPaymentMethodAgreementCreateRequest"},"tags":["PaymentMethodAgreements"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/payment-method-agreements/create-an-agreement-for-a-tenant-payment-method.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
