{"openapi":"3.1.0","info":{"title":"Payments","version":"1.0.0","description":"API reference for accepting payments with PayMe — sales via hosted payment page, hosted fields or direct API, tokens, subscriptions, refunds and captures, 3D Secure, invoices and point-of-sale. Start with Getting Started for credentials, environments and a first sale."},"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"},"partnerKey":{"type":"apiKey","in":"header","name":"PayMe-Partner-Key"},"publicKey":{"type":"apiKey","in":"header","name":"PayMe-Public-Key"},"signature":{"type":"apiKey","in":"header","name":"PayMe-Signature"}}},"tags":[{"name":"IL Direct Debit"}],"paths":{"/generate-sale":{"post":{"operationId":"post-generate-sale-il-direct-debit","summary":"Create an Israeli direct debit authorization","tags":["IL Direct Debit"],"description":"2 actions use this endpoint, each with its own page and example:\n\n- [Create an Israeli direct debit authorization](/payments/il-direct-debit/post-generate-sale-il-direct-debit): POST /generate-sale — Create an Israeli direct debit authorization\n- [Charge an Israeli direct debit authorization](/payments/il-direct-debit/post-generate-sale-2-il-direct-debit): POST /generate-sale — Charge an Israeli direct debit authorization","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"seller_payme_id":{"type":"string","description":"The seller's MPL, in the JSON body. The authorization is given to this seller."},"payme_client_key":{"type":"string","description":"Partners only: your partner key (or send the `PayMe-Partner-Key` header). With `seller_payme_id`, the seller must belong to you, otherwise error `20`."},"sale_type":{"type":"string","description":"Must be `token`."},"sale_payment_method":{"type":"string","description":"Must be `il-direct-debit`."},"sale_price":{"type":"integer","description":"Any numeric value. The setup sale is always created with `100` and nothing is charged. A missing or non-numeric value returns `352`."},"currency":{"type":"string","description":"Send `ILS`. Without it the account's default currency is used."},"product_name":{"type":"string","description":"Any short description, for example `Direct debit authorization`. It doesn't affect the setup. Missing returns `353`."},"transaction_id":{"type":"string","description":"Your own order reference, up to 50 characters. PayMe returns it in responses and callbacks but doesn't check it for uniqueness."},"sale_callback_url":{"type":"string","description":"Where PayMe sends the `sale-complete` / `sale-failure` and `sale-il-direct-debit-update` callbacks. If omitted, your partner's default callback URL is used, if one is set; a seller has no dashboard setting for it, so send it. Must be a public address: `localhost`, private or loopback IP addresses and IPv6 addresses are refused with error `21`, which fails the whole call."},"sale_return_url":{"type":"string","description":"Where PayMe redirects the buyer after the setup page. Same address rules as `sale_callback_url` (error `21`)."},"language":{"type":"string","description":"Language of the payment page and the error messages. Default `he`. `he` and `en` are fully supported; `es`, `ru` and `ar` are accepted, but messages and the payment page are then mostly in English. Case-insensitive; any other value, or an empty string, returns error `51`."}},"required":["seller_payme_id","sale_type","sale_payment_method","sale_price","product_name"],"title":"Create an Israeli direct debit authorization"},{"type":"object","properties":{"seller_payme_id":{"type":"string","description":"The seller's MPL, in the JSON body."},"payme_client_key":{"type":"string","description":"Partners only: your partner key (or send the `PayMe-Partner-Key` header). With `seller_payme_id`, the seller must belong to you, otherwise error `20`."},"buyer_key":{"type":"string","description":"The token from the authorization setup. It must be active: the setup's `sale-complete` callback has arrived (otherwise error `604`)."},"sale_type":{"type":"string","description":"`sale` (default)."},"sale_payment_method":{"type":"string","description":"`il-direct-debit`. The token's own method is used either way."},"sale_price":{"type":"integer","description":"Amount to debit, in minor units. The default allowed range is `500`–`4000000` (error `352`)."},"currency":{"type":"string","description":"`ILS` (anything else returns `320`)."},"product_name":{"type":"string","description":"Shown on the seller's records and invoice. Missing returns `353`."},"transaction_id":{"type":"string","description":"Your own order reference, up to 50 characters. PayMe returns it in responses and callbacks but doesn't check it for uniqueness."},"sale_callback_url":{"type":"string","description":"Where PayMe sends `sale-paid`, `sale-complete` and `sale-failure`. If omitted, your partner's default callback URL is used, if one is set; a seller has no dashboard setting for it, so send it. Must be a public address: `localhost`, private or loopback IP addresses and IPv6 addresses are refused with error `21`, which fails the whole call."},"language":{"type":"string","description":"Language of the payment page and the error messages. Default `he`. `he` and `en` are fully supported; `es`, `ru` and `ar` are accepted, but messages and the payment page are then mostly in English. Case-insensitive; any other value, or an empty string, returns error `51`."}},"required":["seller_payme_id","buyer_key","sale_price","currency","product_name"],"title":"Charge an Israeli direct debit authorization"}]},"examples":{"post-generate-sale-il-direct-debit":{"summary":"Create an Israeli direct debit authorization","description":"POST /generate-sale — Create an Israeli direct debit authorization","value":{"seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","sale_type":"token","sale_payment_method":"il-direct-debit","sale_price":100,"currency":"ILS","product_name":"Direct debit authorization","transaction_id":"ildd-setup-1001","sale_callback_url":"https://your-server.example.com/payme/callback","sale_return_url":"https://your-site.example.com/ildd/done","language":"en"}},"post-generate-sale-2-il-direct-debit":{"summary":"Charge an Israeli direct debit authorization","description":"POST /generate-sale — Charge an Israeli direct debit authorization","value":{"seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","buyer_key":"BUYERDEMO-BUYERDEMO-BUYERDEMO-1234567","sale_type":"sale","sale_payment_method":"il-direct-debit","sale_price":1000,"currency":"ILS","product_name":"Monthly membership","transaction_id":"order-1003","sale_callback_url":"https://your-server.example.com/payme/callback","language":"en"}}}}}},"responses":{"200":{"description":"Setup sale created","x-response-kind":"success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` success, `1` error."},"sale_url":{"type":"string","description":"PayMe's payment page for this sale. Show it to the buyer in an iframe or a redirect, exactly as returned. It stays payable while the sale is `initial` or `failed`, until `sale_expiry_seconds` passes if you sent it."},"payme_sale_id":{"type":"string","description":"PayMe's sale ID. Store it: refunds, captures and queries use it."},"payme_sale_code":{"type":"integer","description":"Short numeric sale code, for display only."},"price":{"type":"integer","description":"Sale amount in minor units (`100` for a token sale)."},"transaction_id":{"type":"string","description":"Your order reference, as sent."},"currency":{"type":"string","description":"Sale currency (ISO 4217)."},"sale_payment_method":{"type":"string","description":"Payment method of the sale, for example `credit-card` or `multi`."},"session":{"type":"string","description":"Request ID. Quote it when you contact PayMe."}},"title":"Create an Israeli direct debit authorization"},{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` the debit was submitted; `1` it was refused."},"payme_status":{"type":"string","description":"`success` or `error`."},"payme_sale_id":{"type":"string","description":"PayMe's sale ID."},"payme_sale_code":{"type":"integer","description":"Short numeric sale code, for display only."},"sale_status":{"type":"string","description":"`initial` until the debit completes (`completed`, about 8 days later) or fails."},"sale_payment_method":{"type":"string","description":"`il-direct-debit`."},"price":{"type":"integer","description":"Amount in minor units."},"currency":{"type":"string","description":"`ILS`."},"transaction_id":{"type":"string","description":"Your order reference, as sent."},"payme_transaction_id":{"type":"string","description":"PayMe's ID for this debit."},"payme_transaction_total":{"type":"integer","description":"Amount of this transaction, in minor units."},"payme_signature":{"type":"string","description":"Signature, computed as described on [Callbacks](/payments/getting-started/callbacks)."},"sale_paid_date":{"type":"string","description":"When the debit was submitted."}},"title":"Charge an Israeli direct debit authorization"}]},"examples":{"post-generate-sale-il-direct-debit":{"summary":"Create an Israeli direct debit authorization","description":"POST /generate-sale — Create an Israeli direct debit authorization","value":{"status_code":0,"session":"AtsJ0as5","sale_url":"https://sandbox.payme.io/sale/generate/SALE1700-000000AA-EXAMPLE1-SALE0001","payme_sale_id":"SALE1700-000000AA-EXAMPLE1-SALE0001","payme_sale_code":12345678,"price":100,"transaction_id":"ildd-setup-1001","currency":"ILS","sale_payment_method":"il-direct-debit"}},"post-generate-sale-2-il-direct-debit":{"summary":"Charge an Israeli direct debit authorization","description":"POST /generate-sale — Charge an Israeli direct debit authorization","value":{"status_code":0,"payme_status":"success","payme_sale_id":"SALE1700-000000AA-EXAMPLE1-SALE0001","payme_sale_code":12345678,"sale_status":"initial","sale_payment_method":"il-direct-debit","price":1000,"currency":"ILS","transaction_id":"order-1003","payme_transaction_id":"TRAN1700-000000AA-EXAMPLE1-TXN00001","payme_transaction_total":1000,"payme_signature":"f8ffc5bb45fe6c3ad326c439f1a21c28","sale_paid_date":"2026-11-09 10:15:02"}}}}}},"500":{"description":"Request refused. Most request errors return HTTP 500 with `status_code: 1`; some return 400, 403, 422 or 429. See [Errors](/payments/getting-started/errors).","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`1` for an error."},"status_error_code":{"type":"integer","description":"PayMe's error code, for example `251` (seller not found) or `352` (invalid price)."},"status_error_details":{"type":"string","description":"The error message, in the requested `language` (Hebrew by default)."},"status_additional_info":{"type":"string","description":"Extra detail, usually the name of the field at fault."},"session":{"type":"string","description":"Request ID. Quote it when you contact PayMe."}}},"examples":{"post-generate-sale-il-direct-debit":{"summary":"Create an Israeli direct debit authorization","description":"POST /generate-sale — Create an Israeli direct debit authorization","value":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"AtsJ0as5"}},"post-generate-sale-2-il-direct-debit":{"summary":"Charge an Israeli direct debit authorization","description":"POST /generate-sale — Charge an Israeli direct debit authorization","value":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"AtsJ0as5"}}}}}}}}}}}