{"openapi":"3.1.0","info":{"title":"B2B Payments","version":"1.0.0","description":"API reference for business-to-business payments: create payment contracts that send a payment or request one, manage their invoices and recipients, and transfer funds between wallets."},"servers":[{"url":"https://sandbox.payme.io/api","description":"Sandbox"},{"url":"https://live.payme.io/api","description":"Production"}],"components":{"securitySchemes":{"merchantKey":{"type":"apiKey","in":"header","name":"PayMe-Merchant-Key"}}},"tags":[{"name":"Contracts"}],"paths":{"/payment-contracts":{"post":{"security":[{"merchantKey":[]}],"operationId":"post-user","summary":"Create a payment contract","tags":["Contracts"],"description":"Creates a contract that sends a payment to another seller (`payment.type` `1`) or requests a payment from one (`payment.type` `2`). PayMe asks the recipient to approve it by SMS or email; once it is approved, the payment runs on `payment.due_date`. See [B2B payment contracts](/b2b-payments/contracts) for the setup, the statuses and the callbacks.\n\n- **Authentication:** send the initiator's `seller_payme_id` (MPL) in the `PayMe-Merchant-Key` header, or as `seller_payme_id` in the body.\n- **Amounts** are in minor units (`1000` = 10.00).\n- **Payment method:** for `credit-card` and `il-direct-debit`, send the payment method's `buyer_key` at the **top level** of the body, not inside `payment`. Without it, on a contract that sends a payment, PayMe charges the payer's attached card that is valid on the due date and expires last (or the last `Active` direct-debit authorization).\n- **Retries are safe:** a request that repeats the initiator, recipient, `amount`, `currency`, `payment.due_date` and `payment.type` of a contract created in the last 5 minutes (and not failed) returns that contract instead of creating a new one.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`422` | `20` | (a validation message) | A required field is missing or a value is invalid. `status_additional_info` joins all the validation messages.\n`400` | `252` | Currency is not allowed for this seller | `currency` isn't enabled for the initiator or the recipient.\n`400` | `320` | Currency is not supported | `il-direct-debit` with a currency other than `ILS`.\n`400` | `25` | Please verify phone number | `recipient.phone` isn't a valid mobile or international number.\n`400` | `251` | Seller was not found | `recipient.payme_id` matches no seller.\n`400` | `381` | Not enough details for unique recipient identification | Only `recipient.business_code` was sent and it matches no PayMe seller. Add `email` or `phone`.\n`400` | `383` | Initiator and recipient are the same | The recipient is the initiator's own account.\n`400` | `384` | Recipient account settings problem - please contact Customer Support | The recipient's seller account is inactive.\n`400` | `389` | The payment method isn't attached to the payer's account, please attach it or use a different one | `credit-card` or `il-direct-debit`, and the payer has no such payment method attached.\n`400` | `390` | The credit card expiration date is lower than the payment's due date, please add another payment method | No attached card is valid on `payment.due_date`.\n`400` | `391` | We didn't find any bank debits we can use for that account, please create a new one or select a different payment method | No direct-debit authorization is `Active`.\n`400` | `392` | The selected payment method isn't matching the provided token | `buyer_key` isn't one of the payer's attached payment methods of this `payment.method`.\n`400` | `393` | The contract amount is over the maximum amount for the selected payment method | A `credit-card` or `il-direct-debit` contract over `5000000`.\n`400` | `394` | The selected payment method does not match the provided token | `buyer_key` sent with `funds-transfer`.\n`500` | `1` | Required parameter is missing | No seller key: neither the `PayMe-Merchant-Key` header nor `seller_payme_id` in the body. `status_additional_info` is `payme_client_key`.\n`500` | `251` | Seller was not found | The seller key is unknown.\n`500` | `163` | Account settings problem - please contact Customer Support | The initiator's seller account is inactive.\n`500` | `900` | Please provide all required information in JSON format. Make sure to include 'Content-Type: application/json' header | The request isn't JSON.\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The initiator's `seller_payme_id` (MPL). You can send `seller_payme_id` in the JSON body instead.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"What the payment is for, for example an invoice number. The recipient sees it."},"amount":{"type":"integer","description":"Amount in minor units (`1000` = 10.00). At least `1`. `credit-card` and `il-direct-debit` contracts: at most `5000000` (error `393`)."},"currency":{"type":"string","description":"The currency, as a 3-letter ISO 4217 code: ILS, USD, EUR, GBP, TRY, CHF, SEK, NOK, CAD, ZAR, JPY, AUD, AED, ARS, BHD, BRL, CNY, INR, KRW, KWD, KZT, MXN, NGN, PLN, RON, RUB, SAR, UAH, PHP, VND or HKD. It must be enabled for both sellers on the contract, otherwise the call returns error `252`. `il-direct-debit` supports only `ILS`."},"buyer_key":{"type":"string","description":"The payment method to charge: a `buyer_key` from `seller_credit_cards` or `seller_bank_authorizations` of [`get-sellers`](/payments/query-apis/post-get-sellers) for the payer. Send it at the top level, not inside `payment`. Only for `credit-card` and `il-direct-debit`; with `funds-transfer` it returns error `394`. If you omit it on a contract that sends a payment, PayMe charges the attached card that is valid on `payment.due_date` and expires last, or the last `Active` direct-debit authorization."},"remote_id":{"type":"string","description":"Your own reference for the contract: letters, digits, `-` and `_`. PayMe doesn't check that it is unique."},"callback_url":{"type":"string","description":"A valid URL that receives a callback on every status change. See [Callbacks](/b2b-payments/contracts#callbacks)."},"recipient":{"type":"object","description":"Who receives the payment (`payment.type` `1`) or is asked to pay (`payment.type` `2`). Send at least one of `payme_id`, `business_code`, `email` or `phone`; PayMe uses them to find the recipient's PayMe seller account. If no seller matches, PayMe still sends the approval request to the `email` or `phone`, and the recipient opens a PayMe account when approving. To target one specific seller, send `payme_id` alone.","properties":{"payme_id":{"type":"string","description":"The recipient's `seller_payme_id` (MPL), or the `seller_payme_id_checksum` from [List previous recipients](/b2b-payments/contracts/get-recipient). When you send it, send no other `recipient` field (validation error otherwise)."},"business_code":{"type":"integer","description":"The recipient's business number. If it is the only identifier you send, it must match a PayMe seller (error `381` otherwise)."},"email":{"type":"string","description":"The recipient's email address. PayMe sends the approval request here and uses it to find the recipient's seller account."},"phone":{"type":"string","description":"The recipient's mobile number: an Israeli mobile number (e.g. `0500000001`) or an international number with its country code. PayMe sends the approval request here by SMS and uses it to find the recipient's seller account. An invalid number returns error `25`."},"name":{"type":"string","description":"The recipient's name. Returned by [List previous recipients](/b2b-payments/contracts/get-recipient)."},"language":{"type":"string","description":"The language of the notifications sent to the recipient: `he` or `en`. Default: `he`. If the recipient already has a PayMe seller account, that account's language is used instead."}}},"payment":{"type":"object","description":"The payment details.","properties":{"type":{"type":"integer","description":"`1` – the initiator sends a payment to the recipient; `2` – the initiator requests a payment from the recipient."},"method":{"type":"string","description":"`funds-transfer` – from the payer's PayMe balance; `credit-card` – an attached card; `il-direct-debit` – an attached Israeli direct-debit authorization (`ILS` only)."},"due_date":{"type":"string","description":"When the payment runs, `YYYY-MM-DD HH:MM:SS`. Must be in the future."},"recurring":{"type":"object","description":"Send it to repeat the payment. The contract is recurring only when both fields are sent.","properties":{"frequency_type":{"type":"integer","description":"How often the payment repeats: `1` day, `2` week, `3` month, `4` year, `5` quarter."},"iterations":{"type":"integer","description":"Number of payments, `1` to `54`. Required when you send `frequency_type`."}}}},"required":["type","method","due_date"]}},"required":["description","amount","currency","recipient","payment"]},"example":{"description":"December payment","amount":500000,"currency":"ILS","buyer_key":"BUYERDEMO-BUYERDEMO-BUYERDEMO-1234567","remote_id":"INV-2026-12","callback_url":"https://www.example.com/callback","recipient":{"business_code":515555555,"email":"supplier@example.com","phone":"0500000001","name":"Example Supplies Ltd","language":"en"},"payment":{"type":1,"method":"credit-card","due_date":"2026-12-22 10:00:00"}}}}},"responses":{"201":{"description":"The contract was created (or, on a retry within 5 minutes, the existing contract is returned). The contract fields appear at the top level and again under `data`.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."},"id":{"type":"integer","description":"PayMe's numeric ID of the contract."},"guid":{"type":"string","description":"The contract ID (`CONT…`). Use it in the contract URLs, e.g. `/payment-contracts/{guid}/invoices`."},"description":{"type":"string","description":"What the payment is for, as sent."},"seller_payme_id":{"type":"string","description":"The initiator's `seller_payme_id` (MPL)."},"remote_id":{"type":"string","description":"Your reference, as sent. `null` if you didn't send one."},"created_date":{"type":"string","description":"When the contract was created, `YYYY-MM-DD HH:MM:SS`."},"confirmed_by_recipient_date":{"type":"string","description":"When the recipient approved, `YYYY-MM-DD HH:MM:SS`. `null` until then."},"confirmed_by_initiator_date":{"type":"string","description":"When the initiator side was confirmed, `YYYY-MM-DD HH:MM:SS`. `null` until then."},"resolution_date":{"type":"string","description":"Reserved. Currently always `null`."},"status":{"type":"integer","description":"Contract status: `1` initial, waiting for the recipient; `2` recipient confirmed (moves to `3` at once); `3` approved, waiting for the due date; `4` completed; `5` failed or cancelled (see `error_code`)."},"amount":{"type":"integer","description":"Amount in minor units (`1000` = 10.00)."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."},"payme_signature":{"type":"string","description":"Lowercase hex MD5 of the partner's client key, the partner's client password and the contract `guid`, joined with no separator. See [Callbacks](/b2b-payments/contracts#callbacks)."},"fast_reconciliation":{"type":"boolean","description":"PayMe-internal processing flag. `false` for contracts created as described in these pages."},"error_code":{"type":"integer","description":"Why the contract failed: `11000`–`11004`, listed on [B2B payment contracts](/b2b-payments/contracts#errors). `null` while the contract hasn't failed."},"error_note":{"type":"string","description":"Free text about the failure, such as the cancellation note or the payment error message. `null` otherwise."},"error_text":{"type":"string","description":"The name of `error_code`, e.g. `Recipient Rejected`. `null` otherwise."},"recipient":{"type":"object","description":"The recipient details exactly as you sent them (only the keys you sent appear), plus `local_name` and `intl_name`.","properties":{"payme_id":{"type":"string","description":"As sent."},"business_code":{"type":"integer","description":"As sent: a number, or a string if you sent a string."},"email":{"type":"string","description":"As sent."},"phone":{"type":"string","description":"As sent."},"name":{"type":"string","description":"As sent."},"language":{"type":"string","description":"As sent."},"local_name":{"type":"string","description":"The recipient seller's registered business name. `\"\"` while the recipient has no PayMe seller account."},"intl_name":{"type":"string","description":"The recipient seller's registered business name in English. `\"\"` while the recipient has no PayMe seller account."}}},"payment":{"type":"object","description":"The payment details.","properties":{"type":{"type":"integer","description":"`1` – the initiator sends a payment; `2` – the initiator requests a payment."},"method":{"type":"string","description":"`funds-transfer`, `credit-card` or `il-direct-debit`."},"guarantee_type":{"type":"integer","description":"Used by PayMe's financing services. Ignore it."},"due_date":{"type":"string","description":"When the payment runs, `YYYY-MM-DD HH:MM:SS`."},"recurring":{"type":"object","description":"Repetition of the payment. Both fields are `null` on a one-time contract.","properties":{"frequency_type":{"type":"integer","description":"`1` day, `2` week, `3` month, `4` year, `5` quarter."},"iterations":{"type":"integer","description":"Number of payments."}}}}},"data":{"type":"object","description":"The same contract fields as the top level, repeated."}}},"example":{"status_code":0,"session":"FhT3aXe7","id":63,"guid":"CONT1700-000000AA-EXAMPLE1-CONT0001","description":"December payment","seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","remote_id":"INV-2026-12","created_date":"2026-11-09 12:00:13","confirmed_by_recipient_date":null,"confirmed_by_initiator_date":null,"resolution_date":null,"status":1,"amount":500000,"currency":"ILS","payme_signature":"5dbf1885ce1d4e082757a2cd6086edd1","fast_reconciliation":false,"error_code":null,"error_note":null,"error_text":null,"recipient":{"business_code":515555555,"email":"supplier@example.com","phone":"0500000001","name":"Example Supplies Ltd","language":"en","local_name":"","intl_name":""},"payment":{"type":1,"method":"credit-card","guarantee_type":null,"due_date":"2026-12-22 10:00:00","recurring":{"frequency_type":null,"iterations":null}},"data":{"id":63,"guid":"CONT1700-000000AA-EXAMPLE1-CONT0001","description":"December payment","seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","remote_id":"INV-2026-12","created_date":"2026-11-09 12:00:13","confirmed_by_recipient_date":null,"confirmed_by_initiator_date":null,"resolution_date":null,"status":1,"amount":500000,"currency":"ILS","payme_signature":"5dbf1885ce1d4e082757a2cd6086edd1","fast_reconciliation":false,"error_code":null,"error_note":null,"error_text":null,"recipient":{"business_code":515555555,"email":"supplier@example.com","phone":"0500000001","name":"Example Supplies Ltd","language":"en","local_name":"","intl_name":""},"payment":{"type":1,"method":"credit-card","guarantee_type":null,"due_date":"2026-12-22 10:00:00","recurring":{"frequency_type":null,"iterations":null}}}}}}},"400":{"description":"The request is valid but can't be carried out. See the error table above.","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` on failure."},"status_error_details":{"type":"string","description":"The error message."},"status_additional_info":{"type":"string","description":"More detail, such as the field or value that failed. On `422`, every validation message, joined with spaces."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":1,"status_error_details":"The contract amount is over the maximum amount for the selected payment method","status_additional_info":"Max amount 5000000","status_error_code":393,"session":"FhT3aXe7"}}}},"422":{"description":"Validation error: a required field is missing or a value is invalid.","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` on failure."},"status_error_details":{"type":"string","description":"The error message."},"status_additional_info":{"type":"string","description":"More detail, such as the field or value that failed. On `422`, every validation message, joined with spaces."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":1,"status_error_details":"The payment.method field is required.","status_additional_info":"The payment.method field is required.","status_error_code":20,"session":"FhT3aXe7"}}}},"500":{"description":"No seller key, an unknown or inactive seller, or a body that isn't JSON.","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` on failure."},"status_error_details":{"type":"string","description":"The error message."},"status_additional_info":{"type":"string","description":"More detail, such as the field or value that failed. On `422`, every validation message, joined with spaces."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":1,"status_error_details":"Required parameter is missing","status_additional_info":"payme_client_key","status_error_code":1,"session":"FhT3aXe7"}}}}}},"get":{"security":[{"merchantKey":[]}],"operationId":"get-contracts","summary":"List payment contracts","tags":["Contracts"],"description":"Lists the payment contracts this seller initiated or, with `recipient=true`, the contracts it is the recipient of. Results are paginated (`page`, `per_page`) and can be filtered and sorted. Authenticate with the seller's MPL in the `PayMe-Merchant-Key` header.\n\nTo read one contract, call `GET /payment-contracts/{guid}` with the same header. It returns the same contract fields at the top level and again under `data`, plus `status_code` and `session`. It returns error `380` if no contract with this `guid` involves your seller account.\n\nFor the meaning of each `status`, see [Contract lifecycle](/b2b-payments/contracts#contract-lifecycle).\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`400` | `27` | Limit parameter should be between 1 and 500 | `per_page` is out of range.\n`400` | `52` | Page parameter should be between 1 and 1000 | `page` is out of range.\n`500` | `28` | Invalid order by option | `items_order_by_direction` isn't `asc` or `desc`.\n`500` | `1` | Required parameter is missing | The `PayMe-Merchant-Key` header is missing. `status_additional_info` is `payme_client_key`.\n`500` | `251` | Seller was not found | The seller key is unknown.\n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active.\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The seller's `seller_payme_id` (MPL).","schema":{"type":"string"}},{"name":"recipient","in":"query","required":false,"description":"`true` – list the contracts where this seller is the recipient. Default `false`: the contracts this seller initiated.","schema":{"type":"boolean"}},{"name":"status","in":"query","required":false,"description":"Only contracts in this status: `1` initial, waiting for the recipient; `2` recipient confirmed (moves to `3` at once); `3` approved, waiting for the due date; `4` completed; `5` failed or cancelled (see `error_code`).","schema":{"type":"integer"}},{"name":"payment_type","in":"query","required":false,"description":"`1` – only contracts that send a payment; `2` – only payment requests.","schema":{"type":"integer"}},{"name":"payment_method","in":"query","required":false,"description":"Only contracts paid with this method: `funds-transfer`, `credit-card` or `il-direct-debit`.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"`1` – only one-time contracts; `2` – only recurring contracts.","schema":{"type":"integer"}},{"name":"currency","in":"query","required":false,"description":"Only contracts in this currency (ISO 4217 code, e.g. `ILS`).","schema":{"type":"string"}},{"name":"amount","in":"query","required":false,"description":"Only contracts of exactly this amount, in minor units.","schema":{"type":"integer"}},{"name":"remote_id","in":"query","required":false,"description":"Only contracts with this `remote_id` (exact match).","schema":{"type":"string"}},{"name":"id","in":"query","required":false,"description":"Only the contract with this `guid`.","schema":{"type":"string"}},{"name":"due_date_min","in":"query","required":false,"description":"Earliest due date, inclusive. Expected format: `YYYY-MM-DD HH:MM:SS`.","schema":{"type":"string"}},{"name":"due_date_max","in":"query","required":false,"description":"Latest due date, inclusive. Expected format: `YYYY-MM-DD HH:MM:SS`.","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"Items per page, 1-500. Default: 500. A value outside this range returns error `27`.","schema":{"type":"number"}},{"name":"page","in":"query","required":false,"description":"Page number, 1-1000. Default: 1. A value outside this range returns error `52`.","schema":{"type":"number"}},{"name":"items_order_by_column","in":"query","required":false,"description":"Contract column to sort by: `created_at`, `due_date`, `amount` or `status`. An unknown column fails with HTTP `500`. Without it, no sort order is applied.","schema":{"type":"string"}},{"name":"items_order_by_direction","in":"query","required":false,"description":"Sort direction: `asc` or `desc`. Default: `asc`. Used only with `items_order_by_column`. Any other value returns error `28`.","schema":{"type":"string"}}],"responses":{"200":{"description":"One page of contracts.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The contracts on this page.","items":{"type":"object","properties":{"id":{"type":"integer","description":"PayMe's numeric ID of the contract."},"guid":{"type":"string","description":"The contract ID (`CONT…`). Use it in the contract URLs, e.g. `/payment-contracts/{guid}/invoices`."},"description":{"type":"string","description":"What the payment is for, as sent."},"seller_payme_id":{"type":"string","description":"The initiator's `seller_payme_id` (MPL)."},"remote_id":{"type":"string","description":"Your reference, as sent. `null` if you didn't send one."},"created_date":{"type":"string","description":"When the contract was created, `YYYY-MM-DD HH:MM:SS`."},"confirmed_by_recipient_date":{"type":"string","description":"When the recipient approved, `YYYY-MM-DD HH:MM:SS`. `null` until then."},"confirmed_by_initiator_date":{"type":"string","description":"When the initiator side was confirmed, `YYYY-MM-DD HH:MM:SS`. `null` until then."},"resolution_date":{"type":"string","description":"Reserved. Currently always `null`."},"status":{"type":"integer","description":"Contract status: `1` initial, waiting for the recipient; `2` recipient confirmed (moves to `3` at once); `3` approved, waiting for the due date; `4` completed; `5` failed or cancelled (see `error_code`)."},"amount":{"type":"integer","description":"Amount in minor units (`1000` = 10.00)."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."},"payme_signature":{"type":"string","description":"Lowercase hex MD5 of the partner's client key, the partner's client password and the contract `guid`, joined with no separator. See [Callbacks](/b2b-payments/contracts#callbacks)."},"fast_reconciliation":{"type":"boolean","description":"PayMe-internal processing flag. `false` for contracts created as described in these pages."},"error_code":{"type":"integer","description":"Why the contract failed: `11000`–`11004`, listed on [B2B payment contracts](/b2b-payments/contracts#errors). `null` while the contract hasn't failed."},"error_note":{"type":"string","description":"Free text about the failure, such as the cancellation note or the payment error message. `null` otherwise."},"error_text":{"type":"string","description":"The name of `error_code`, e.g. `Recipient Rejected`. `null` otherwise."},"recipient":{"type":"object","description":"The recipient details exactly as you sent them (only the keys you sent appear), plus `local_name` and `intl_name`.","properties":{"payme_id":{"type":"string","description":"As sent."},"business_code":{"type":"integer","description":"As sent: a number, or a string if you sent a string."},"email":{"type":"string","description":"As sent."},"phone":{"type":"string","description":"As sent."},"name":{"type":"string","description":"As sent."},"language":{"type":"string","description":"As sent."},"local_name":{"type":"string","description":"The recipient seller's registered business name. `\"\"` while the recipient has no PayMe seller account."},"intl_name":{"type":"string","description":"The recipient seller's registered business name in English. `\"\"` while the recipient has no PayMe seller account."}}},"payment":{"type":"object","description":"The payment details.","properties":{"type":{"type":"integer","description":"`1` – the initiator sends a payment; `2` – the initiator requests a payment."},"method":{"type":"string","description":"`funds-transfer`, `credit-card` or `il-direct-debit`."},"guarantee_type":{"type":"integer","description":"Used by PayMe's financing services. Ignore it."},"due_date":{"type":"string","description":"When the payment runs, `YYYY-MM-DD HH:MM:SS`."},"recurring":{"type":"object","description":"Repetition of the payment. Both fields are `null` on a one-time contract.","properties":{"frequency_type":{"type":"integer","description":"`1` day, `2` week, `3` month, `4` year, `5` quarter."},"iterations":{"type":"integer","description":"Number of payments."}}}}}}}},"links":{"type":"object","description":"Links to other pages of the same query.","properties":{"first":{"type":"string","description":"URL of the first page."},"last":{"type":"string","description":"URL of the last page."},"prev":{"type":"string","description":"URL of the previous page. `null` on the first page."},"next":{"type":"string","description":"URL of the next page. `null` on the last page."}}},"meta":{"type":"object","description":"Pagination details.","properties":{"current_page":{"type":"integer","description":"This page's number."},"from":{"type":"integer","description":"Position of the first contract on this page in the full result."},"last_page":{"type":"integer","description":"Number of the last page."},"links":{"type":"array","description":"Page links for building a pager.","items":{"type":"object","properties":{"url":{"type":"string","description":"URL of the page. `null` when there is no such page."},"label":{"type":"string","description":"Label of the link: a page number, or the previous/next arrows."},"active":{"type":"boolean","description":"`true` for the current page."}}}},"path":{"type":"string","description":"The request URL without its query string."},"per_page":{"type":"integer","description":"Contracts per page."},"to":{"type":"integer","description":"Position of the last contract on this page in the full result."},"total":{"type":"integer","description":"Total number of contracts that match the query."}}}}},"example":{"items":[{"id":63,"guid":"CONT1700-000000AA-EXAMPLE1-CONT0001","description":"December payment","seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","remote_id":"INV-2026-12","created_date":"2026-11-09 12:00:13","confirmed_by_recipient_date":"2026-11-10 09:15:42","confirmed_by_initiator_date":"2026-11-10 09:15:42","resolution_date":null,"status":3,"amount":500000,"currency":"ILS","payme_signature":"5dbf1885ce1d4e082757a2cd6086edd1","fast_reconciliation":false,"error_code":null,"error_note":null,"error_text":null,"recipient":{"business_code":515555555,"email":"supplier@example.com","phone":"0500000001","name":"Example Supplies Ltd","language":"en","local_name":"Example Supplies Ltd","intl_name":"Example Supplies Ltd"},"payment":{"type":1,"method":"credit-card","guarantee_type":0,"due_date":"2026-12-22 10:00:00","recurring":{"frequency_type":null,"iterations":null}}}],"links":{"first":"https://sandbox.payme.io/api/payment-contracts?page=1","last":"https://sandbox.payme.io/api/payment-contracts?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo; Previous","active":false},{"url":"https://sandbox.payme.io/api/payment-contracts?page=1","label":"1","active":true},{"url":null,"label":"Next &raquo;","active":false}],"path":"https://sandbox.payme.io/api/payment-contracts","per_page":500,"to":1,"total":1}}}}},"400":{"description":"`page` or `per_page` is out of range.","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` on failure."},"status_error_details":{"type":"string","description":"The error message."},"status_additional_info":{"type":"string","description":"More detail, such as the field or value that failed."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":1,"status_error_details":"Limit parameter should be between 1 and 500","status_additional_info":"per_page","status_error_code":27,"session":"FhT3aXe7"}}}},"500":{"description":"A missing, unknown or inactive seller key, or an invalid sort.","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` on failure."},"status_error_details":{"type":"string","description":"The error message."},"status_additional_info":{"type":"string","description":"More detail, such as the field or value that failed."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":1,"status_error_details":"Required parameter is missing","status_additional_info":"payme_client_key","status_error_code":1,"session":"FhT3aXe7"}}}}}}},"/payment-contracts/{payment_contract_guid}/invoices":{"get":{"security":[{"merchantKey":[]}],"operationId":"get-contracts-files","summary":"List contract files","tags":["Contracts"],"description":"Lists the files (invoices, receipts and other documents) attached to a contract. Both sellers on the contract see every file, whoever uploaded it. Authenticate with your MPL in the `PayMe-Merchant-Key` header; only the two sellers on the contract can call it (error `385` otherwise).\n\nTo list one type of file, add `type`, e.g. `?type=Invoice%20Receipt`. To get one file, call `GET /payment-contracts/{payment_contract_guid}/invoices/{invoice_guid}`: it returns that file's `name`, `mime_type`, `type`, `url` and `id` at the top level (not in an array), or error `757` if the contract has no such file.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`400` | `251` | Seller was not found | The `PayMe-Merchant-Key` header is missing. `status_additional_info` is the header name. \n`400` | `385` | Action not allowed - please contact Customer Support | This seller is neither side of the contract. `status_additional_info` is the seller key. \n`400` | `757` | Invoice not found | You asked for one file and the contract has no file with that ID. \n`422` | `20` | (a validation message) | `type` is not a known file type. `status_additional_info` lists what failed. \n`500` | `251` | Seller was not found | The seller key is unknown. \n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active. \n`500` | `380` | Payment contract not found | No contract has this GUID. `status_additional_info` is the GUID. \n\n\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"Your `seller_payme_id` (MPL). You must be one of the two sellers on the contract.","schema":{"type":"string"}},{"name":"payment_contract_guid","in":"path","required":true,"description":"The contract's `guid`, as returned when the contract was created, e.g. `CONT1700-000000AA-EXAMPLE1-CONT0001`. It already starts with `CONT`; don't add another prefix.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Only files of this type: `Invoice`, `Invoice Receipt`, `Receipt`, `Invoice Refund`, `Receipt Donation`, `Order`, `Delivery`, `Return`, `Offer` or `PurchaseOrder`. URL-encode the space (`Invoice%20Receipt`).","schema":{"type":"string"}}],"responses":{"200":{"description":"The contract's files. An empty array if none is attached.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."},"invoices":{"type":"array","description":"The files attached to the contract.","items":{"type":"object","properties":{"name":{"type":"string","description":"File name, as uploaded."},"mime_type":{"type":"string","description":"The file's MIME type, e.g. `application/pdf`."},"type":{"type":"string","description":"The file type."},"url":{"type":"string","description":"Link to the file."},"id":{"type":"string","description":"The file ID (`INV…`). Use it as `invoice_guid` to replace or delete the file."}}}}}},"example":{"status_code":0,"session":"FhT3aXe7","invoices":[{"name":"invoice-1001.pdf","mime_type":"application/pdf","type":"Invoice Receipt","url":"https://reparser2.paymeservice.com/external/files/3e8ce1bb-c6ff-4e05-94df-f24f30928180","id":"INV17000-000000AA-EXAMPLE1-FILE0001"}]}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"PayMe-Merchant-Key","status_error_code":251,"session":"FhT3aXe7"}}}},"422":{"description":"Unprocessable Entity","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"The selected type is invalid.","status_additional_info":"The selected type is invalid.","status_error_code":20,"session":"FhT3aXe7"}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"FhT3aXe7"}}}}}},"post":{"security":[{"merchantKey":[]}],"operationId":"post-contracts-files","summary":"Upload contract files","tags":["Contracts"],"description":"Attaches one or more files (an invoice, a receipt or another document) to a contract. Either seller on the contract can upload. Only the seller who uploaded a file can later replace or delete it. Send the file content Base64-encoded in JSON, with `Content-Type: application/json` and your MPL in the `PayMe-Merchant-Key` header.\n\nOn a one-time contract, one request can carry at most one file of each `type` (error `386`). A later request may add another file of the same type. File names must be unique within a request (error `387`).\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`400` | `251` | Seller was not found | The `PayMe-Merchant-Key` header is missing. `status_additional_info` is the header name. \n`400` | `385` | Action not allowed - please contact Customer Support | This seller is neither side of the contract. `status_additional_info` is the seller key. \n`400` | `386` | Uploading multiple files not allowed - please contact Customer Support | On a one-time contract, the request has two files of the same `type`, or a `type` that isn't in the list. \n`422` | `20` | (a validation message) | `invoices`, or a `name`, `type`, `base64` or `mime_type` inside it, is missing. `status_additional_info` lists what failed. \n`500` | `251` | Seller was not found | The seller key is unknown. \n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active. \n`500` | `380` | Payment contract not found | No contract has this GUID. `status_additional_info` is the GUID. \n`500` | `387` | Uploading multiple files with same name not allowed | Two files in the request have the same name. \n`500` | `900` | Please provide all required information in JSON format. Make sure to include 'Content-Type: application/json' header | The request is not JSON. \n`500` | `901` | Please verify that the JSON provided is valid | The JSON body is empty or invalid. \n\n\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"Your `seller_payme_id` (MPL). You must be one of the two sellers on the contract.","schema":{"type":"string"}},{"name":"payment_contract_guid","in":"path","required":true,"description":"The contract's `guid`, as returned when the contract was created, e.g. `CONT1700-000000AA-EXAMPLE1-CONT0001`. It already starts with `CONT`; don't add another prefix.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"type":"array","description":"The files to attach.","items":{"type":"object","properties":{"name":{"type":"string","description":"File name, e.g. `invoice-1001.png`. Must be unique within the request (error `387`)."},"type":{"type":"string","description":"The file type: `Invoice`, `Invoice Receipt`, `Invoice Transaction`, `Receipt`, `Invoice Refund`, `Receipt Donation`, `Order`, `Delivery`, `Return`, `Offer` or `PurchaseOrder`. On a one-time contract, another value returns error `386`."},"base64":{"type":"string","description":"The file content, Base64-encoded."},"mime_type":{"type":"string","description":"The file's MIME type, e.g. `application/pdf` or `image/png`."}},"required":["name","type","base64","mime_type"]}}},"required":["invoices"]},"example":{"invoices":[{"name":"invoice-1001.png","type":"Invoice Receipt","base64":"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAARdQTFRFAAAAAAAAAAAAAAAAAQEBDAwMHBwcHx8fCwsLAwMDGRkZHh4eBAQEICAgtra2vb29pKSksLCwODg4FBQUh4eHtLS0m5ubISEh3NzciIiIERERwsLCnp6eAgICjIyMwMDAJycnDg4OBQUFEBAQ0NDQe3t7ycnJeXl5KCgo3d3daWlpCQkJDw8PzMzMmpqarKysyMjIOjo6kZGR9/f3sbGxnZ2dPDw8z8/Pfn5+FxcXjo6OsrKybm5u5ubmExMTBgYG1NTUiYmJCgoKTk5O39/fbGxs7OzsVFRUGhoa2tra9PT00dHRMTExzs7OhoaGhYWFLCwsIyMjuLi4xcXFUlJSRUVFvr6+2dnZoaGhFhYWBwcHFRUV////p5PkYgAAAAN0Uk5Tnvn4e+Nx/gAAAAFiS0dEXOrYAJcAAAAJcEhZcwAAAEgAAABIAEbJaz4AAACnSURBVBjTY2BgZEYCjAwMTMwogImBGQ0ABVhY2dg5gExOLm4esAAvH7+AoBCzsIiomDhYgEtCUkpaRlZOXkFRCSygrKIqrqauoamlqA0xQ0dXT9/A0MjYxNQMIqBsbmFpZW1ja2hnDxGwc3B0cnZxdXNnZmEBC3h4esmJefv4uvj5B4AFAoP0zINDmEPDwiMiwQJR0UrROkDFHNFREDPQnI7hOXTvAwCtbBUc7QjTawAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0wMS0yMFQwNjo1NTozNiswMDowMA0Ih5IAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMjBUMDY6NTU6MzYrMDA6MDB8VT8uAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE1NDc5NjczMzaP/6esAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMTktMDEtMjAvMTVjOGNmYTk5NjBmYmJjOWUyY2NjNGI4MTY2YTI3NTQuaWNvLnBuZ0jyrXwAAAAASUVORK5CYII=","mime_type":"image/png"}]}}}},"responses":{"200":{"description":"The files were attached. Note the capital `I` in `Invoices`: the list call returns `invoices`.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."},"Invoices":{"type":"array","description":"The files just attached.","items":{"type":"object","properties":{"name":{"type":"string","description":"File name, as uploaded."},"mime_type":{"type":"string","description":"The file's MIME type, e.g. `application/pdf`."},"type":{"type":"string","description":"The file type."},"url":{"type":"string","description":"Link to the file."},"id":{"type":"string","description":"The file ID (`INV…`). Use it as `invoice_guid` to replace or delete the file."}}}}}},"example":{"status_code":0,"session":"FhT3aXe7","Invoices":[{"name":"invoice-1001.png","mime_type":"image/png","type":"Invoice Receipt","url":"https://reparser2.paymeservice.com/external/files/3e8ce1bb-c6ff-4e05-94df-f24f30928180","id":"INV17000-000000AA-EXAMPLE1-FILE0001"}]}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"PayMe-Merchant-Key","status_error_code":251,"session":"FhT3aXe7"}}}},"422":{"description":"Unprocessable Entity","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"The invoices.0.base64 field is required.","status_additional_info":"The invoices.0.base64 field is required.","status_error_code":20,"session":"FhT3aXe7"}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"FhT3aXe7"}}}}}}},"/payment-contracts/{payment_contract_guid}/invoices/{invoice_guid}":{"put":{"operationId":"put-contracts-files","summary":"Replace a contract file","tags":["Contracts"],"description":"Replaces the content of a file you uploaded to a contract. The file keeps its `id` and its `type`: send the `type` it already has (error `388` otherwise). Only the seller who uploaded the file can replace it. Send JSON with `Content-Type: application/json` and your MPL in the `PayMe-Merchant-Key` header.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`400` | `251` | Seller was not found | The `PayMe-Merchant-Key` header is missing. `status_additional_info` is the header name. \n`400` | `385` | Action not allowed - please contact Customer Support | This seller is neither side of the contract. `status_additional_info` is the seller key. \n`400` | `385` | Action not allowed - please contact Customer Support | This seller may not change this file. \n`400` | `388` | File type has to be the same | The new `type` differs from the file's type. \n`400` | `757` | Invoice not found | The contract has no file with that ID. \n`422` | `20` | (a validation message) | `type`, `base64` or `mime_type` is missing. `status_additional_info` lists what failed. \n`500` | `251` | Seller was not found | The seller key is unknown. \n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active. \n`500` | `380` | Payment contract not found | No contract has this GUID. `status_additional_info` is the GUID. \n`500` | `900` | Please provide all required information in JSON format. Make sure to include 'Content-Type: application/json' header | The request is not JSON. \n`500` | `901` | Please verify that the JSON provided is valid | The JSON body is empty or invalid. \n\n\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"Your `seller_payme_id` (MPL). You must be the seller that uploaded the file.","schema":{"type":"string"}},{"name":"payment_contract_guid","in":"path","required":true,"description":"The contract's `guid`, as returned when the contract was created, e.g. `CONT1700-000000AA-EXAMPLE1-CONT0001`. It already starts with `CONT`; don't add another prefix.","schema":{"type":"string"}},{"name":"invoice_guid","in":"path","required":true,"description":"The file's `id` (`INV…`), as returned by [Upload contract files](/b2b-payments/contracts/post-contracts-files) or [List contract files](/b2b-payments/contracts/get-contracts-files).","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New file name. Default: the current name."},"type":{"type":"string","description":"The file's current type. A different type returns error `388`."},"base64":{"type":"string","description":"The new file content, Base64-encoded."},"mime_type":{"type":"string","description":"The new file's MIME type, e.g. `application/pdf` or `image/png`."}},"required":["type","base64","mime_type"]},"example":{"name":"invoice-1001.png","type":"Invoice Receipt","base64":"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAARdQTFRFAAAAAAAAAAAAAAAAAQEBDAwMHBwcHx8fCwsLAwMDGRkZHh4eBAQEICAgtra2vb29pKSksLCwODg4FBQUh4eHtLS0m5ubISEh3NzciIiIERERwsLCnp6eAgICjIyMwMDAJycnDg4OBQUFEBAQ0NDQe3t7ycnJeXl5KCgo3d3daWlpCQkJDw8PzMzMmpqarKysyMjIOjo6kZGR9/f3sbGxnZ2dPDw8z8/Pfn5+FxcXjo6OsrKybm5u5ubmExMTBgYG1NTUiYmJCgoKTk5O39/fbGxs7OzsVFRUGhoa2tra9PT00dHRMTExzs7OhoaGhYWFLCwsIyMjuLi4xcXFUlJSRUVFvr6+2dnZoaGhFhYWBwcHFRUV////p5PkYgAAAAN0Uk5Tnvn4e+Nx/gAAAAFiS0dEXOrYAJcAAAAJcEhZcwAAAEgAAABIAEbJaz4AAACnSURBVBjTY2BgZEYCjAwMTMwogImBGQ0ABVhY2dg5gExOLm4esAAvH7+AoBCzsIiomDhYgEtCUkpaRlZOXkFRCSygrKIqrqauoamlqA0xQ0dXT9/A0MjYxNQMIqBsbmFpZW1ja2hnDxGwc3B0cnZxdXNnZmEBC3h4esmJefv4uvj5B4AFAoP0zINDmEPDwiMiwQJR0UrROkDFHNFREDPQnI7hOXTvAwCtbBUc7QjTawAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0wMS0yMFQwNjo1NTozNiswMDowMA0Ih5IAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMjBUMDY6NTU6MzYrMDA6MDB8VT8uAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE1NDc5NjczMzaP/6esAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMTktMDEtMjAvMTVjOGNmYTk5NjBmYmJjOWUyY2NjNGI4MTY2YTI3NTQuaWNvLnBuZ0jyrXwAAAAASUVORK5CYII=","mime_type":"image/png"}}}},"responses":{"200":{"description":"The file was replaced.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":0,"session":"FhT3aXe7"}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"PayMe-Merchant-Key","status_error_code":251,"session":"FhT3aXe7"}}}},"422":{"description":"Unprocessable Entity","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"The base64 field is required.","status_additional_info":"The base64 field is required.","status_error_code":20,"session":"FhT3aXe7"}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"FhT3aXe7"}}}}}},"delete":{"operationId":"delete-contracts-files","summary":"Delete a contract file","tags":["Contracts"],"description":"Deletes a file you uploaded to a contract. Only the seller who uploaded the file can delete it (error `385`).\n\nSend `Content-Type: application/json` and a JSON body that isn't empty, for example `{\"confirm\": true}`. A DELETE without a JSON body fails with error `900` or `901`.\n\nIf the contract has no file with this `invoice_guid`, the call returns success (`status_code` `0`) and deletes nothing.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`400` | `251` | Seller was not found | The `PayMe-Merchant-Key` header is missing. `status_additional_info` is the header name. \n`400` | `385` | Action not allowed - please contact Customer Support | This seller is neither side of the contract. `status_additional_info` is the seller key. \n`400` | `385` | Action not allowed - please contact Customer Support | This seller may not delete this file. \n`500` | `251` | Seller was not found | The seller key is unknown. \n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active. \n`500` | `380` | Payment contract not found | No contract has this GUID. `status_additional_info` is the GUID. \n`500` | `900` | Please provide all required information in JSON format. Make sure to include 'Content-Type: application/json' header | The request is not JSON. \n`500` | `901` | Please verify that the JSON provided is valid | The JSON body is empty or invalid. \n\n\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"Your `seller_payme_id` (MPL). You must be the seller that uploaded the file.","schema":{"type":"string"}},{"name":"payment_contract_guid","in":"path","required":true,"description":"The contract's `guid`, as returned when the contract was created, e.g. `CONT1700-000000AA-EXAMPLE1-CONT0001`. It already starts with `CONT`; don't add another prefix.","schema":{"type":"string"}},{"name":"invoice_guid","in":"path","required":true,"description":"The file's `id` (`INV…`), as returned by [Upload contract files](/b2b-payments/contracts/post-contracts-files) or [List contract files](/b2b-payments/contracts/get-contracts-files).","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"confirm":true}}},"description":"Required: any JSON object that isn't empty, e.g. `{\"confirm\": true}`. PayMe doesn't read its content."},"responses":{"200":{"description":"The file was deleted, or the contract has no file with this `invoice_guid`.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":0,"session":"FhT3aXe7"}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"PayMe-Merchant-Key","status_error_code":251,"session":"FhT3aXe7"}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"number","description":"Status code 1 (for failure)"},"status_error_details":{"type":"string","description":"What caused the error"},"status_additional_info":{"type":"string","description":"The parameters related to the error"},"status_error_code":{"type":"number","description":"Status error code"},"session":{"type":"string","description":"PayMe session ID."}}},"example":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"FhT3aXe7"}}}}}}},"/payment-contracts/recipients":{"get":{"security":[{"merchantKey":[]}],"operationId":"get-recipient","summary":"List previous recipients","tags":["Contracts"],"description":"Lists the recipients of this seller's earlier contracts that are registered PayMe sellers, so you can create a new contract for them without typing their details again. Authenticate with the initiator's MPL in the `PayMe-Merchant-Key` header.\n\n- PayMe returns one entry per recipient seller account linked to any of your contracts, whatever the contract's status, as long as that account is active.\n- `name`, `phone`, `email` and `business_code` are the details you sent on your most recent contract with that recipient that included an `email`. They are not the recipient's registered details. A recipient you never sent an `email` for isn't listed.\n- To pay a listed recipient, send its `seller_payme_id_checksum` as `recipient.payme_id` in [Create a payment contract](/b2b-payments/contracts/post-user), with no other `recipient` field.\n- The result isn't paginated: `page` is always `1`, and `items_per_page` and `items_total` both equal the number of items.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`500` | `1` | Required parameter is missing | The `PayMe-Merchant-Key` header is missing. `status_additional_info` is `payme_client_key`.\n`500` | `251` | Seller was not found | The seller key is unknown.\n`500` | `163` | Account settings problem - please contact Customer Support | The seller is not active.\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The initiator's `seller_payme_id` (MPL).","schema":{"type":"string"}}],"responses":{"200":{"description":"Your previous recipients. An empty `items` array if there are none.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."},"page":{"type":"integer","description":"Always `1`."},"items_per_page":{"type":"integer","description":"The number of items."},"items_total":{"type":"integer","description":"The number of items."},"items":{"type":"array","description":"One entry per recipient seller account.","items":{"type":"object","properties":{"name":{"type":"string","description":"The recipient name you sent. `null` if you didn't send one."},"phone":{"type":"string","description":"The phone number you sent. `null` if you didn't send one."},"business_code":{"type":"integer","description":"The business number you sent, as sent: a number, or a string if you sent a string. `null` if you didn't send one."},"email":{"type":"string","description":"The email address you sent."},"seller_payme_id_checksum":{"type":"string","description":"An encrypted reference to the recipient's seller account. Send it as `recipient.payme_id` when you create a contract. Treat it as opaque: it differs on every call, and every value works."}}}}}},"example":{"status_code":0,"session":"FhT3aXe7","page":1,"items_per_page":2,"items_total":2,"items":[{"name":"Example Supplies Ltd","phone":"0500000001","business_code":515555555,"email":"supplier@example.com","seller_payme_id_checksum":"eyJpdiI6IkV4YW1wbGVJVjAwMDAwMDAwMDAwPT0iLCJ2YWx1ZSI6IkV4YW1wbGUxIn0="},{"name":null,"phone":null,"business_code":516666666,"email":"billing@example.com","seller_payme_id_checksum":"eyJpdiI6IkV4YW1wbGVJVjExMTExMTExMTExPT0iLCJ2YWx1ZSI6IkV4YW1wbGUyIn0="}]}}}},"500":{"description":"A missing, unknown or inactive seller key.","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` on failure."},"status_error_details":{"type":"string","description":"The error message."},"status_additional_info":{"type":"string","description":"More detail, such as the field or value that failed."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":1,"status_error_details":"Required parameter is missing","status_additional_info":"payme_client_key","status_error_code":1,"session":"FhT3aXe7"}}}}}}}}}