{"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":"Wallets"}],"paths":{"/sales":{"post":{"operationId":"post-generate-transfer","summary":"Transfer funds between sellers","tags":["Wallets"],"description":"Moves funds from one seller's PayMe balance (`payment.origin_seller_id`) to another seller's (`seller_payme_id`). PayMe records the transfer as a completed sale on the receiving seller, with `sale_payment_method` `funds-transfer`. Amounts are in minor units (`1000` = 10.00).\n\n- **Authentication:** `seller_payme_id`, the receiving seller's MPL, authenticates the call. Partners also send `payme_client_key`.\n- **Same partner, different accounts:** both sellers must belong to the same partner, and they must be two different accounts (error `20`).\n- **Services:** the origin seller needs the `funds-transfer` service and the receiving seller the `funds-transfer Destination` service (error `720`). To enable them, ask <partners@payme.io> and give both MPLs.\n- **Validated origin:** the origin seller's account must be validated (error `109`).\n- **A failed transfer still returns HTTP `200`**, with `status_code` `1`, `payme_status` `error` and the reason in `status_error_code` and `status_error_details`. Check `status_code`, not only the HTTP status.\n\n### Errors\n\nHTTP status | Error code | Message | When\n---|---|---|---\n`500` | `1` | Required parameter is missing | `seller_payme_id` or `payment.origin_seller_id` is missing. `status_additional_info` names it.\n`400` | `353` | Invalid description | `product_name` is missing.\n`500` | `352` | Invalid price, out of min-max bounds | `sale_price` is missing or not a number.\n`400` | `252` | Currency is not allowed for this seller | `currency` isn't enabled for the receiving seller.\n`500` | `20` | Validation error | The two sellers are the same account (`Funds must be transferred between different accounts`), or they belong to different partners (`Merchant-Seller inconsistency`).\n`500` | `720` | The service was not activated | A seller lacks the funds-transfer service. `status_additional_info` is `funds-transfer` (origin seller) or `funds-transfer Destination` (receiving seller).\n`400` | `109` | Seller not validated | The origin seller's account isn't validated.\n`500` | `251` | Seller was not found | A seller key is unknown.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"seller_payme_id":{"type":"string","description":"The MPL of the seller that receives the funds. It also authenticates the call."},"payme_client_key":{"type":"string","description":"Partners: your client key. Both sellers must belong to this partner."},"sale_price":{"type":"integer","description":"The amount to transfer, in minor units (`1000` = 10.00)."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`. It must be enabled for the receiving seller (error `252`)."},"product_name":{"type":"string","description":"What the transfer is for. It becomes the sale's description (error `353` if missing)."},"payment":{"type":"object","description":"The transfer details.","properties":{"method":{"type":"string","description":"Must be `funds-transfer`. Without it, PayMe doesn't make a transfer."},"origin_seller_id":{"type":"string","description":"The MPL of the seller whose balance is debited. It must differ from `seller_payme_id`."}},"required":["method","origin_seller_id"]}},"required":["seller_payme_id","sale_price","currency","product_name","payment"]},"example":{"seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-7654321","sale_price":15000,"currency":"ILS","product_name":"Monthly settlement","payment":{"method":"funds-transfer","origin_seller_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567"}}}}},"responses":{"200":{"description":"The transfer result, as a sale on the receiving seller. The response also carries the other fields of a sale response, such as `buyer_*`, `payme_transaction_card_brand` and `installments`. They describe card sales; don't rely on them for a transfer.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` – the transfer succeeded; `1` – it failed (see `status_error_code`)."},"payme_status":{"type":"string","description":"`success` or `error`."},"status_error_code":{"type":"integer","description":"`0` on success; the error code otherwise."},"status_error_details":{"type":"string","description":"The error message. Only when the transfer failed."},"payme_sale_id":{"type":"string","description":"The sale created on the receiving seller (`SALE…`)."},"payme_sale_code":{"type":"integer","description":"The sale's numeric ID."},"sale_created":{"type":"string","description":"When the sale was created, `YYYY-MM-DD HH:MM:SS`."},"sale_status":{"type":"string","description":"`completed` when the transfer succeeded."},"payme_sale_status":{"type":"string","description":"Same as `sale_status`."},"sale_payment_method":{"type":"string","description":"`funds-transfer`."},"currency":{"type":"string","description":"The currency, as sent."},"price":{"type":"integer","description":"The amount transferred, in minor units."},"sale_description":{"type":"string","description":"Your `product_name`."},"payme_signature":{"type":"string","description":"The sale signature. See [Verifying a callback](/payments/getting-started/callbacks#verifying-a-callback-payme_signature)."},"payme_transaction_id":{"type":"string","description":"The transaction on the receiving seller (`TRAN…`)."},"payme_transaction_total":{"type":"integer","description":"The transaction amount, in minor units."},"sale_paid_date":{"type":"string","description":"When the transfer ran, `YYYY-MM-DD HH:MM:SS`."},"sale_release_date":{"type":"string","description":"The release date of the funds to the receiving seller, `YYYY-MM-DD HH:MM:SS`."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact PayMe support."}}},"example":{"status_code":0,"payme_status":"success","status_error_code":0,"payme_sale_id":"SALE1700-000000AA-EXAMPLE1-SALE0001","payme_sale_code":8965519,"sale_created":"2026-11-09 16:28:08","sale_status":"completed","payme_sale_status":"completed","sale_payment_method":"funds-transfer","currency":"ILS","price":15000,"sale_description":"Monthly settlement","payme_signature":"9c1d6f0e2b7a4c3d8e5f6a7b8c9d0e1f","payme_transaction_id":"TRAN1700-000000AA-EXAMPLE1-TXN00001","payme_transaction_total":15000,"sale_paid_date":"2026-11-09 16:28:08","sale_release_date":"2026-11-09 16:28:09","session":"FhT3aXe7"}}}},"400":{"description":"A missing `product_name`, a currency the receiving seller can't use, or an origin seller that isn't validated.","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":"Invalid description","status_additional_info":"product_name","status_error_code":353,"session":"FhT3aXe7"}}}},"500":{"description":"A missing field or key, sellers that can't transfer to each other, or a service that isn't enabled.","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":"The service was not activated","status_additional_info":"funds-transfer","status_error_code":720,"session":"FhT3aXe7"}}}}}}}}}