{"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":"Hosted Payment Page"}],"paths":{"/generate-sale":{"post":{"operationId":"post-generate-sale","summary":"Create a sale (hosted payment page)","tags":["Hosted Payment Page"],"description":"2 actions use this endpoint, each with its own page and example:\n\n- [Create a sale (hosted payment page)](/payments/hosted-payment-page/post-generate-sale): Creates a sale and returns sale_url, PayMe's payment page for it.\n- [Create a multi-method checkout sale](/payments/hosted-payment-page/post-generate-sale-2): Creates a sale whose payment page lets the buyer choose any payment method enabled on the account: card, Bit, Apple Pay, Google Pay and others.","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"seller_payme_id":{"type":"string","description":"The seller's MPL. Send it in the JSON body: `generate-sale` doesn't read the `PayMe-Merchant-Key` header, so a request without a body MPL returns error `1`. Partners may send `seller_id` with `payme_client_key` instead."},"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`."},"seller_id":{"type":"string","description":"Partners only: your own ID for the seller, set in `create-seller`, sent instead of `seller_payme_id`. Requires `payme_client_key`."},"sale_price":{"type":"integer","description":"Sale amount in minor units: 50.75 is sent as `5075`. The default allowed range is `500`–`4000000`, the same in every currency; PayMe can set a different range for a partner. A missing, non-numeric or out-of-range value returns error `352`. Decimals are rounded."},"currency":{"type":"string","description":"Sale currency, a 3-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code such as `ILS`, enabled on the account (otherwise error `252`). Required for `sale` and `authorize`; a `token` or `template` sale without it uses the account's default currency."},"product_name":{"type":"string","description":"Short description of the product or service, up to 500 characters. Shown to the buyer, and on the invoice when the invoicing service is active. Missing returns error `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."},"installments":{"type":"string","description":"Number of payments. `1` (default) or `0`: one payment. `2`–`12`: that fixed number. `102`–`112`: the buyer chooses on the page, up to the last two digits (`106` = up to 6). More than one installment is ILS only (`312`) and works only with `credit-card` or `multi` (other methods return `351`). On a `multi` page that lets the buyer choose, a buyer who pays with Apple Pay or Google Pay pays in one payment. Fixed values above 12 are accepted when the sale is created, but the payment fails unless PayMe has enabled more installments on your account. A non-numeric value returns `10`, any other unaccepted value `351`, and an ILS price lower than the number of installments `358`."},"sale_type":{"type":"string","description":"`sale` (default) – charge now (J4). `authorize` – reserve the amount for up to 168 hours, then capture it with [`capture-sale`](/accepting-payments/capture-and-saved-cards/capture-sale) (J5). `token` – save the card without charging (the price is set to `100`). `template` – one link that many buyers can pay. `credit` – pay money to the card (needs the Credit Sale service). `multi-capture` – capture part of an authorization (needs `origin_sale_id`). The full list is on [Sale Types](/payments/codes-statuses/sale-types); any other value returns `357`."},"sale_payment_method":{"type":"string","description":"Payment method; see [Available Payment Methods](/payments/wallets-apms). Default `credit-card`. Send `multi` to let the buyer choose among every method enabled on the account. Case-insensitive. An unknown value returns `24`; a method not enabled on the account returns `720` with the method name; `bacs` needs `GBP` and `sepa` needs `EUR` (`320`). Send a string: an array returns `368` (HTTP 400)."},"market_fee":{"type":"number","description":"The partner's (marketplace's) fee: a percentage of the sale price, VAT included, from `0` to `60`. It is added on top of PayMe's fees and transferred to the marketplace once a month. Default: the seller's market fee set at `create-seller`. A non-numeric value returns `10`, a negative one `304`, and more than 60 `308`. Ignored for sellers paid directly."},"sale_callback_url":{"type":"string","description":"Where PayMe sends server-to-server callbacks for this sale, as a form-encoded `POST`; see [Callbacks](/payments/getting-started/callbacks). If omitted, PayMe uses your partner's default callback URL, if one is set; a seller has no dashboard setting for it, so send it on every call. 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 (the iframe or the full page) after a successful payment, with the sale details as query parameters; see [Hosted Payment Page options](/accepting-payments/checkout-and-in-person/hosted-payment-page-options). If omitted, your partner's default return URL is used, if one is set. Same address rules as `sale_callback_url` (error `21`)."},"cancel_url":{"type":"string","description":"Where to send the buyer when 3D Secure authentication fails, instead of back to the payment page. Also the PayPal cancel address. Must be a public URL (error `21`)."},"sale_send_notification":{"type":"boolean","description":"`true`: PayMe sends the buyer a payment request with the payment link, by email to `sale_email` and by SMS to `sale_mobile`. Default `false`."},"sale_email":{"type":"string","description":"Buyer's email. Pre-fills the payment page and receives the payment request when `sale_send_notification` is `true`."},"sale_mobile":{"type":"string","description":"Buyer's mobile number. Pre-fills the payment page and receives the SMS payment request when `sale_send_notification` is `true` and the SMS service is active on the account."},"sale_name":{"type":"string","description":"Buyer's full name. Pre-fills the payment page (split at the first space into first and last name) and is used in notifications."},"sale_send_creation_callback":{"type":"boolean","description":"`true`: PayMe also sends a `sale-create` callback, with `sale_url`, as soon as the sale is created. Default `false`."},"sale_expiry_seconds":{"type":"integer","description":"How many seconds the sale stays payable after it is created. After that, the payment page answers HTTP 403 and paying the sale fails with error `367`. Without it, `sale_url` has no fixed expiry."},"capture_buyer":{"type":"string","description":"`1` or `true` to save the buyer's card as a token after the payment; the token arrives as `buyer_key` in the callback. Omit it, or send `0`, to skip. Works with `credit-card`, `apple-pay`, `il-direct-debit` and `multi` (other methods return `4`). Can't be combined with `buyer_key` (`601`)."},"buyer_is_private":{"type":"boolean","description":"With `capture_buyer` or a token sale: `true` ties the token to this seller, so `get-buyer-key` works with the seller's MPL. Without it the token is account-level: any seller of the same partner can charge it, and a `get-buyer-key` call that sends `seller_payme_id` fails with error `603`."},"buyer_perform_validation":{"type":"boolean","description":"With `capture_buyer` or a token sale: whether PayMe validates the card with the issuer before saving the token. Default `true`. Sending `true` without `capture_buyer` or a token sale returns `608`."},"buyer_key":{"type":"string","description":"Charges a saved token at once: no payment page and no `sale_url` (see the \"Token charged\" response). The token comes from a callback, [`get-buyer-key`](/payments/tokenization/post-get-buyer-key) or Hosted Fields `tokenize()`. Can't be combined with `capture_buyer` (`601`), `sale_type` `token`/`seller-token` (`602`) or `template` (`606`)."},"buyer_business_name":{"type":"string","description":"With `buyer_key` and the invoicing service: the business name the invoice is issued to. Send it together with `buyer_business_code`, or neither."},"buyer_business_code":{"type":"integer","description":"With `buyer_key` and the invoicing service: the business code (VAT identifier) the invoice is issued to. Send it together with `buyer_business_name`, or neither."},"layout":{"type":"string","description":"Payment page layout: `dynamic` (default), `dynamic-loose` (no social ID or CVV validation), `qr-sms` (Bit: QR code or SMS), `token-capture` (save a card without a charge; requires `sale_type: token`). Other values fall back to `dynamic`."},"sale_should_be_opened_once":{"type":"boolean","description":"`true`: with `layout: token-capture`, the page can be opened only once. Ignored otherwise."},"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`."},"services":{"type":"array","description":"Per-sale settings for services on the account, as objects `{\"name\": \"<service>\", \"settings\": {...}}`. For example `[{\"name\": \"invoice\", \"settings\": {\"active\": false}}]` skips the invoice for this sale, and `[{\"name\": \"3DSecure\", \"settings\": {\"active\": true}}]` forces 3D Secure. Each object needs `settings` (error `1`). Unknown or inactive services are ignored."},"sale_deferred_months":{"type":"integer","description":"Deferred charge: the number of months, `1`–`12`, by which the card charge is deferred. Only for `credit-card` sales of `sale_type` `sale` (other types or methods return `4`); a value outside `1`–`12` returns `365`. PayMe must enable deferred charges on your account."},"order_number":{"type":"string","description":"Purchase order number, used for level 2 and level 3 card data. Up to 15 digits."},"items":{"type":"array","description":"Line items of the sale, as an array of objects. If you send `items`, every item needs `name`, `quantity`, `unit_price` and `total`; an invalid item returns error `20` (HTTP 422) with the failing rules in `status_additional_info`. Item keys are case-insensitive.","items":{"type":"object","properties":{"name":{"type":"string","description":"Item name, 1–50 characters."},"quantity":{"type":"integer","description":"Quantity, `0`–`999999`."},"unit_price":{"type":"integer","description":"Price of one unit, in minor units."},"total":{"type":"integer","description":"Line total after discount, in minor units, `0`–`9000000000`."},"unit_measurement":{"type":"string","description":"Unit of measurement, for example `kg`."},"discount_total":{"type":"number","description":"Discount on this line, in minor units, sent as a negative number."},"description":{"type":"string","description":"Item description, up to 150 characters."},"product_code":{"type":"string","description":"Your catalog code for the item, up to 100 characters."},"commodity_code":{"type":"number","description":"Numeric commodity code of the item."},"custom1":{"type":"string","description":"Free text for your own use, up to 100 characters."},"custom2":{"type":"string","description":"Free text for your own use, up to 100 characters."}},"required":["name","quantity","unit_price","total"]}},"fees":{"type":"object","description":"Amounts included in the payment, for level 2 and level 3 card data. Each is in minor units, up to 12 digits.","properties":{"tax":{"type":"number","description":"Tax included in the payment."},"duty":{"type":"number","description":"International duties included in the payment."},"discount":{"type":"number","description":"Total discount given on the payment."},"shipping":{"type":"number","description":"Shipping cost included in the payment."}}},"shipping_details":{"type":"object","description":"Where the order is shipped. Stored with the sale.","properties":{"name":{"type":"string","description":"Addressee's full name or company name, up to 50 characters."},"email":{"type":"string","description":"Addressee's email, up to 100 characters."},"phone":{"type":"string","description":"Addressee's phone number, up to 50 characters."},"address":{"type":"object","description":"The shipping address.","properties":{"line1":{"type":"string","description":"First line of the shipping address."},"line2":{"type":"string","description":"Second line of the shipping address."},"postal_code":{"type":"string","description":"Postal code of the shipping address."},"city":{"type":"string","description":"City of the shipping address."},"state":{"type":"string","description":"State or region of the shipping address."},"country":{"type":"string","description":"Two-letter ISO 3166-1 country code, for example `IL`. Other values are ignored."}}}}},"billing_details":{"type":"object","description":"The payer's billing details. Stored with the sale.","properties":{"name":{"type":"string","description":"Payer's full name or company name."},"email":{"type":"string","description":"Payer's email."},"phone":{"type":"string","description":"Payer's phone number."},"address":{"type":"object","description":"The billing address.","properties":{"line1":{"type":"string","description":"First line of the billing address."},"line2":{"type":"string","description":"Second line of the billing address."},"postal_code":{"type":"string","description":"Postal code of the billing address."},"city":{"type":"string","description":"City of the billing address."},"state":{"type":"string","description":"State or region of the billing address."},"country":{"type":"string","description":"Two-letter ISO 3166-1 country code, for example `IL`. Other values are ignored."}}}}}},"required":["seller_payme_id","sale_price","currency","product_name"],"title":"Create a sale (hosted payment page)"},{"type":"object","properties":{"seller_payme_id":{"type":"string","description":"The seller's MPL. Send it in the JSON body: `generate-sale` doesn't read the `PayMe-Merchant-Key` header, so a request without a body MPL returns error `1`. Partners may send `seller_id` with `payme_client_key` instead."},"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`."},"seller_id":{"type":"string","description":"Partners only: your own ID for the seller, set in `create-seller`, sent instead of `seller_payme_id`. Requires `payme_client_key`."},"sale_payment_method":{"type":"string","description":"Required for this page: `multi`. The page lists every payment method enabled on the account. Without it the sale is created as `credit-card`."},"sale_price":{"type":"integer","description":"Sale amount in minor units: 50.75 is sent as `5075`. The default allowed range is `500`–`4000000`, the same in every currency; PayMe can set a different range for a partner. A missing, non-numeric or out-of-range value returns error `352`. Decimals are rounded."},"currency":{"type":"string","description":"Sale currency, a 3-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code such as `ILS`, enabled on the account (otherwise error `252`). Required for `sale` and `authorize`; a `token` or `template` sale without it uses the account's default currency."},"product_name":{"type":"string","description":"Short description of the product or service, up to 500 characters. Shown to the buyer, and on the invoice when the invoicing service is active. Missing returns error `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."},"installments":{"type":"string","description":"Number of payments. `1` (default) or `0`: one payment. `2`–`12`: that fixed number. `102`–`112`: the buyer chooses on the page, up to the last two digits (`106` = up to 6). More than one installment is ILS only (`312`) and works only with `credit-card` or `multi` (other methods return `351`). On a `multi` page that lets the buyer choose, a buyer who pays with Apple Pay or Google Pay pays in one payment. Fixed values above 12 are accepted when the sale is created, but the payment fails unless PayMe has enabled more installments on your account. A non-numeric value returns `10`, any other unaccepted value `351`, and an ILS price lower than the number of installments `358`."},"sale_type":{"type":"string","description":"`sale` (default) – charge now (J4). `authorize` – reserve the amount for up to 168 hours, then capture it with [`capture-sale`](/accepting-payments/capture-and-saved-cards/capture-sale) (J5). `template` – one link that many buyers can pay. The full list is on [Sale Types](/payments/codes-statuses/sale-types); any other value returns `357`."},"market_fee":{"type":"number","description":"The partner's (marketplace's) fee: a percentage of the sale price, VAT included, from `0` to `60`. It is added on top of PayMe's fees and transferred to the marketplace once a month. Default: the seller's market fee set at `create-seller`. A non-numeric value returns `10`, a negative one `304`, and more than 60 `308`. Ignored for sellers paid directly."},"sale_callback_url":{"type":"string","description":"Where PayMe sends server-to-server callbacks for this sale, as a form-encoded `POST`; see [Callbacks](/payments/getting-started/callbacks). If omitted, PayMe uses your partner's default callback URL, if one is set; a seller has no dashboard setting for it, so send it on every call. 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 (the iframe or the full page) after a successful payment, with the sale details as query parameters; see [Hosted Payment Page options](/accepting-payments/checkout-and-in-person/hosted-payment-page-options). If omitted, your partner's default return URL is used, if one is set. Same address rules as `sale_callback_url` (error `21`)."},"cancel_url":{"type":"string","description":"Where to send the buyer when 3D Secure authentication fails, instead of back to the payment page. Also the PayPal cancel address. Must be a public URL (error `21`)."},"sale_send_notification":{"type":"boolean","description":"`true`: PayMe sends the buyer a payment request with the payment link, by email to `sale_email` and by SMS to `sale_mobile`. Default `false`."},"sale_email":{"type":"string","description":"Buyer's email. Pre-fills the payment page and receives the payment request when `sale_send_notification` is `true`."},"sale_mobile":{"type":"string","description":"Buyer's mobile number. Pre-fills the payment page and receives the SMS payment request when `sale_send_notification` is `true` and the SMS service is active on the account."},"sale_name":{"type":"string","description":"Buyer's full name. Pre-fills the payment page (split at the first space into first and last name) and is used in notifications."},"sale_send_creation_callback":{"type":"boolean","description":"`true`: PayMe also sends a `sale-create` callback, with `sale_url`, as soon as the sale is created. Default `false`."},"sale_expiry_seconds":{"type":"integer","description":"How many seconds the sale stays payable after it is created. After that, the payment page answers HTTP 403 and paying the sale fails with error `367`. Without it, `sale_url` has no fixed expiry."},"capture_buyer":{"type":"string","description":"`1` or `true` to save the buyer's card as a token after the payment; the token arrives as `buyer_key` in the callback. Omit it, or send `0`, to skip. Works with `credit-card`, `apple-pay`, `il-direct-debit` and `multi` (other methods return `4`). Can't be combined with `buyer_key` (`601`)."},"buyer_is_private":{"type":"boolean","description":"With `capture_buyer` or a token sale: `true` ties the token to this seller, so `get-buyer-key` works with the seller's MPL. Without it the token is account-level: any seller of the same partner can charge it, and a `get-buyer-key` call that sends `seller_payme_id` fails with error `603`."},"buyer_perform_validation":{"type":"boolean","description":"With `capture_buyer` or a token sale: whether PayMe validates the card with the issuer before saving the token. Default `true`. Sending `true` without `capture_buyer` or a token sale returns `608`."},"layout":{"type":"string","description":"Payment page layout: `dynamic` (default), `dynamic-loose` (no social ID or CVV validation), `qr-sms` (Bit: QR code or SMS), `token-capture` (save a card without a charge; requires `sale_type: token`). Other values fall back to `dynamic`."},"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`."},"services":{"type":"array","description":"Per-sale settings for services on the account, as objects `{\"name\": \"<service>\", \"settings\": {...}}`. For example `[{\"name\": \"invoice\", \"settings\": {\"active\": false}}]` skips the invoice for this sale, and `[{\"name\": \"3DSecure\", \"settings\": {\"active\": true}}]` forces 3D Secure. Each object needs `settings` (error `1`). Unknown or inactive services are ignored."},"order_number":{"type":"string","description":"Purchase order number, used for level 2 and level 3 card data. Up to 15 digits."},"items":{"type":"array","description":"Line items of the sale, as an array of objects. If you send `items`, every item needs `name`, `quantity`, `unit_price` and `total`; an invalid item returns error `20` (HTTP 422) with the failing rules in `status_additional_info`. Item keys are case-insensitive.","items":{"type":"object","properties":{"name":{"type":"string","description":"Item name, 1–50 characters."},"quantity":{"type":"integer","description":"Quantity, `0`–`999999`."},"unit_price":{"type":"integer","description":"Price of one unit, in minor units."},"total":{"type":"integer","description":"Line total after discount, in minor units, `0`–`9000000000`."},"unit_measurement":{"type":"string","description":"Unit of measurement, for example `kg`."},"discount_total":{"type":"number","description":"Discount on this line, in minor units, sent as a negative number."},"description":{"type":"string","description":"Item description, up to 150 characters."},"product_code":{"type":"string","description":"Your catalog code for the item, up to 100 characters."},"commodity_code":{"type":"number","description":"Numeric commodity code of the item."},"custom1":{"type":"string","description":"Free text for your own use, up to 100 characters."},"custom2":{"type":"string","description":"Free text for your own use, up to 100 characters."}},"required":["name","quantity","unit_price","total"]}},"fees":{"type":"object","description":"Amounts included in the payment, for level 2 and level 3 card data. Each is in minor units, up to 12 digits.","properties":{"tax":{"type":"number","description":"Tax included in the payment."},"duty":{"type":"number","description":"International duties included in the payment."},"discount":{"type":"number","description":"Total discount given on the payment."},"shipping":{"type":"number","description":"Shipping cost included in the payment."}}},"shipping_details":{"type":"object","description":"Where the order is shipped. Stored with the sale.","properties":{"name":{"type":"string","description":"Addressee's full name or company name, up to 50 characters."},"email":{"type":"string","description":"Addressee's email, up to 100 characters."},"phone":{"type":"string","description":"Addressee's phone number, up to 50 characters."},"address":{"type":"object","description":"The shipping address.","properties":{"line1":{"type":"string","description":"First line of the shipping address."},"line2":{"type":"string","description":"Second line of the shipping address."},"postal_code":{"type":"string","description":"Postal code of the shipping address."},"city":{"type":"string","description":"City of the shipping address."},"state":{"type":"string","description":"State or region of the shipping address."},"country":{"type":"string","description":"Two-letter ISO 3166-1 country code, for example `IL`. Other values are ignored."}}}}},"billing_details":{"type":"object","description":"The payer's billing details. Stored with the sale.","properties":{"name":{"type":"string","description":"Payer's full name or company name."},"email":{"type":"string","description":"Payer's email."},"phone":{"type":"string","description":"Payer's phone number."},"address":{"type":"object","description":"The billing address.","properties":{"line1":{"type":"string","description":"First line of the billing address."},"line2":{"type":"string","description":"Second line of the billing address."},"postal_code":{"type":"string","description":"Postal code of the billing address."},"city":{"type":"string","description":"City of the billing address."},"state":{"type":"string","description":"State or region of the billing address."},"country":{"type":"string","description":"Two-letter ISO 3166-1 country code, for example `IL`. Other values are ignored."}}}}}},"required":["seller_payme_id","sale_payment_method","sale_price","currency","product_name"],"title":"Create a multi-method checkout sale"}]},"examples":{"post-generate-sale":{"summary":"Create a sale (hosted payment page)","description":"Creates a sale and returns sale_url, PayMe's payment page for it.","value":{"seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","sale_price":1000,"currency":"ILS","product_name":"Smartphone","transaction_id":"order-1001","installments":"1","sale_type":"sale","sale_payment_method":"credit-card","sale_callback_url":"https://your-server.example.com/payme/callback","sale_return_url":"https://your-site.example.com/payment/success","sale_name":"First Last","sale_email":"buyer@example.com","sale_mobile":"+972500000040","language":"en"}},"post-generate-sale-2":{"summary":"Create a multi-method checkout sale","description":"Creates a sale whose payment page lets the buyer choose any payment method enabled on the account: card, Bit, Apple Pay, Google Pay and others.","value":{"seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","sale_payment_method":"multi","sale_price":1000,"currency":"ILS","product_name":"Smartphone","transaction_id":"order-1001","installments":"1","sale_type":"sale","sale_callback_url":"https://your-server.example.com/payme/callback","sale_return_url":"https://your-site.example.com/payment/success","sale_name":"First Last","sale_email":"buyer@example.com","language":"en"}}}}}},"responses":{"200":{"description":"Token charged (`buyer_key`). The response holds the sale and transaction fields, the same as the callback, and has no `sale_url`. A declined charge also returns HTTP 200, with `status_code: 1`, `status_error_code` and `status_error_details`: always check `status_code`.","x-response-kind":"success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` the token was charged; `1` the charge failed (a decline also comes with HTTP 200)."},"payme_status":{"type":"string","description":"`success` or `error`."},"status_error_code":{"type":"integer","description":"`0` on success; otherwise the error or decline code, see [Errors](/payments/getting-started/errors)."},"payme_sale_id":{"type":"string","description":"PayMe's sale ID. Every call creates a new sale, even when the charge is refused."},"payme_sale_code":{"type":"integer","description":"Short numeric sale code, for display only."},"sale_status":{"type":"string","description":"See [Sale Statuses](/payments/codes-statuses/sale-statuses): `completed` for a charge, `authorized` for `sale_type: authorize`."},"sale_type":{"type":"string","description":"Sale type name, for example `Sale`; see [Sale Types](/payments/codes-statuses/sale-types)."},"sale_payment_method":{"type":"string","description":"The token's payment method; it replaces any `sale_payment_method` you sent."},"price":{"type":"integer","description":"Sale amount in minor units."},"currency":{"type":"string","description":"Sale currency (ISO 4217)."},"transaction_id":{"type":"string","description":"Your order reference, as sent."},"is_token_sale":{"type":"boolean","description":"`false`: this charge isn't a token-saving sale."},"payme_signature":{"type":"string","description":"Signature, computed as described on [Callbacks](/payments/getting-started/callbacks)."},"payme_transaction_id":{"type":"string","description":"PayMe's ID for this charge."},"payme_transaction_total":{"type":"integer","description":"Amount of this transaction, in minor units."},"payme_transaction_auth_number":{"type":"string","description":"Authorization number from the card company."},"buyer_card_mask":{"type":"string","description":"First 6 and last 4 digits of the card."},"installments":{"type":"integer","description":"Number of installments."},"sale_paid_date":{"type":"string","description":"When the payment happened."},"sale_3ds":{"type":"boolean","description":"Whether 3D Secure was used."}},"title":"Create a sale (hosted payment page)"},{"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 a multi-method checkout sale"}]},"examples":{"post-generate-sale":{"summary":"Create a sale (hosted payment page)","description":"Creates a sale and returns sale_url, PayMe's payment page for it.","value":{"status_code":0,"payme_status":"success","status_error_code":0,"payme_sale_id":"SALE1700-000000AA-EXAMPLE1-SALE0001","payme_sale_code":12345678,"sale_status":"completed","sale_type":"Sale","sale_payment_method":"credit-card","price":1000,"currency":"ILS","transaction_id":"order-1001","is_token_sale":false,"payme_signature":"f8ffc5bb45fe6c3ad326c439f1a21c28","payme_transaction_id":"TRAN1700-000000AA-EXAMPLE1-TXN00001","payme_transaction_total":1000,"payme_transaction_auth_number":"0123456","buyer_card_mask":"455743******3431","installments":1,"sale_paid_date":"2026-11-09 10:15:02","sale_3ds":false}},"post-generate-sale-2":{"summary":"Create a multi-method checkout sale","description":"Creates a sale whose payment page lets the buyer choose any payment method enabled on the account: card, Bit, Apple Pay, Google Pay and others.","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":1000,"transaction_id":"order-1001","currency":"ILS","sale_payment_method":"multi"}}}}}},"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":{"summary":"Create a sale (hosted payment page)","description":"Creates a sale and returns sale_url, PayMe's payment page for it.","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":{"summary":"Create a multi-method checkout sale","description":"Creates a sale whose payment page lets the buyer choose any payment method enabled on the account: card, Bit, Apple Pay, Google Pay and others.","value":{"status_code":1,"status_error_details":"Seller was not found","status_additional_info":"seller_payme_id","status_error_code":251,"session":"AtsJ0as5"}}}}}}}}}}}