{"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":"Invoices"}],"paths":{"/documents":{"post":{"operationId":"post-create-invoice","summary":"Create a document","tags":["Invoices"],"description":"> ⚠️ **This API is deprecated** and is no longer recommended for use. For questions, contact partners@payme.io. \n\n## Overview\n\nCreates an invoice, receipt or other tax document for the seller through PayMe's invoicing service. The seller's invoicing service must be active; otherwise every documents call returns error `703` (HTTP 403).\n\nDocuments are created asynchronously: the response returns `doc_id` and `doc_url` at once, but the document may not be ready yet. While the document job is still running (its status is `waiting`, `active`, `delayed`, `paused` or `stuck`), [Get a document](/payments/invoices/show-generated-document-by-id) returns error `1005` with HTTP 400 and the status in `status_additional_info`, for example `status:waiting`. Wait a few seconds and call it again.\n\nIf the seller still has to approve the connection to the Israel Tax Authority, the response holds only `authority_redirect_url` and no document is created. Send the seller to that URL to approve it, then call again.\n\nPayMe passes amounts, totals and `vat_rate` to the invoicing service as you send them. Don't send card numbers or CVVs: a document needs no card data.\n\n#### Document types\nThe types you can create are listed on [Document types](/payments/codes-statuses/document-types).\n\n#### Documents issued automatically\nWith the invoicing service active on the account, a paid sale issues a document and a refund (including a refund of a subscription charge) automatically issues a credit document. A refund never un-issues the original document; canceling a document takes a separate counter-document. To skip the automatic document for one API sale, send `\"services\": [{\"name\": \"invoice\", \"settings\": {\"active\": false}}]` on `generate-sale`. \n\n## Authentication\n\nName the seller with `seller_payme_id` in the body or the `PayMe-Merchant-Key` header. A partner may instead send `payme_client_key` (body or `PayMe-Partner-Key` header) with its own `seller_id`. With no credential at all, the call returns error `1` with `status_additional_info` `payme_client_key`.\n\n### Errors\n\n| HTTP | Code | When |\n|---|---|---|\n| `400` | `20` | Validation failed. `status_additional_info` lists the messages per field. |\n| `400` | `1` | A partner key was sent, but no seller. `status_additional_info` is `seller_payme_id`.  |\n| `400` | `20` | The seller doesn't belong to this partner. `status_additional_info` is `Merchant-Seller inconsistency`.  |\n| `403` | `703` | The invoicing service isn't active for this seller.  |\n| `500` | `1` | No credential was sent at all. `status_additional_info` is `payme_client_key`.  |\n| `500` | `251` | The seller key is unknown.  |\n| `500` | `163` | The seller isn't active.  |\n| `500` | `200` | The partner key is unknown.  |\n| `500` | `201` | The partner isn't active.  |\n| `500` | `1001` | The invoicing service returned an error. `status_additional_info` carries its code and details. |\n| `503` | `1001` | The invoicing service didn't answer in time. |\n| `500` | `1004` | The invoicing service didn't create the document. |\n\n","parameters":[{"name":"PayMe-Merchant-Key","in":"header","required":false,"description":"The seller's MPL, instead of `seller_payme_id` in the body.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"seller_payme_id":{"type":"string","description":"The seller's MPL. You can send it in the `PayMe-Merchant-Key` header instead."},"payme_client_key":{"type":"string","description":"Partners only: your partner key, in the body or the `PayMe-Partner-Key` header."},"seller_id":{"type":"string","description":"Partners only: your own reference for the seller, instead of `seller_payme_id`. Needs `payme_client_key`."},"doc_type":{"type":"integer","description":"Document type: `100`, `200`, `300`, `305`, `320`, `330`, `400`, `405` or `600`. See [Document types](/payments/codes-statuses/document-types)."},"buyer_name":{"type":"string","description":"Buyer name printed on the document."},"buyer_address":{"type":"string","description":"Buyer address printed on the document."},"buyer_social_id":{"type":"string","description":"Buyer national ID or company number, printed as the buyer's tax ID. Default: `credit_card.buyer_social_id`."},"currency":{"type":"string","description":"ISO 4217 currency code of the document."},"language":{"type":"string","description":"Document language: `he` (default) or `en`."},"doc_date":{"type":"string","description":"Document date, for example `2026-11-09`."},"due_date":{"type":"string","description":"Payment due date."},"pay_date":{"type":"string","description":"Date the payment was made."},"doc_title":{"type":"string","description":"Title printed at the top of the document."},"doc_comments":{"type":"string","description":"Comments printed on the document."},"exchange_rate":{"type":"number","description":"Exchange rate used on the document."},"vat_rate":{"type":"number","description":"VAT rate applied to the document."},"discount":{"type":"number","description":"Discount applied to the document."},"total_excluding_vat":{"type":"number","description":"Total before VAT."},"total_sum_after_discount":{"type":"number","description":"Total after the discount."},"total_sum_including_vat":{"type":"number","description":"Total including VAT."},"total_vat":{"type":"number","description":"Total VAT."},"total_paid":{"type":"number","description":"Total paid on this document."},"total_paid_including_vat":{"type":"number","description":"Total paid, including VAT."},"items":{"type":"array","description":"Document lines. At least one.","items":{"type":"object","properties":{"description":{"type":"string","description":"Line description, at least 3 characters."},"unit_price":{"type":"number","description":"Unit price before VAT. Send `unit_price` or `unit_price_with_vat`."},"unit_price_with_vat":{"type":"number","description":"Unit price including VAT."},"quantity":{"type":"integer","description":"Quantity."},"vat_exempt":{"type":"boolean","description":"`true` if the line is exempt from VAT."},"currency":{"type":"string","description":"ISO 4217 currency code of the line."},"exchange_rate":{"type":"number","description":"Exchange rate of the line's currency."}},"required":["description"]}},"cash":{"type":"object","description":"Cash payment received. Send it only for cash that was actually paid.","properties":{"sum":{"type":"number","description":"Amount paid in cash."}},"required":["sum"]},"cheques":{"type":"array","description":"Cheques received.","items":{"type":"object","properties":{"sum":{"type":"number","description":"Cheque amount."},"date":{"type":"string","description":"Cheque date."},"bank":{"type":"number","description":"Bank code. See [Banks in Israel](/payments/codes-statuses/banks-in-israel)."},"branch":{"type":"number","description":"Branch number."},"account":{"type":"string","description":"Account number, digits only."},"number":{"type":"string","description":"Cheque number, digits only."}},"required":["sum","date"]}},"bank_transfer":{"type":"object","description":"Bank transfer received. Send it only for a transfer that was actually made.","properties":{"sum":{"type":"number","description":"Amount transferred."},"date":{"type":"string","description":"Date the transfer was received."},"account":{"type":"string","description":"Account number, digits only."}},"required":["sum"]},"paypal":{"type":"object","description":"PayPal payment received.","properties":{"sum":{"type":"number","description":"Amount paid with PayPal."},"date":{"type":"string","description":"Payment date."},"transaction_id":{"type":"string","description":"PayPal transaction ID."},"buyer_name":{"type":"string","description":"Payer name."}},"required":["sum","date","transaction_id","buyer_name"]},"credit_card":{"type":"object","description":"Card payment received. Don't send the card number or CVV.","properties":{"sum":{"type":"number","description":"Amount paid by card."},"date":{"type":"string","description":"Payment date."},"installments":{"type":"integer","description":"Number of installments."},"first_payment":{"type":"number","description":"Amount of the first installment."},"type":{"type":"string","description":"Card brand, for example `Visa`."},"expiry":{"type":"string","description":"Card expiry, exactly 4 characters `MMYY`. Must not be in the past."},"buyer_name":{"type":"string","description":"Card holder's name."},"buyer_social_id":{"type":"string","description":"Card holder's national ID, digits only. Also printed as the buyer's tax ID when `buyer_social_id` isn't sent."},"auth_number":{"type":"string","description":"Authorization number of the card payment."}},"required":["sum"]}},"required":["seller_payme_id","doc_type","buyer_name","items"]},"example":{"seller_payme_id":"MPLDEMO-MPLDEMO-MPLDEMO-1234567","doc_type":400,"buyer_name":"Israel Israeli","doc_date":"2026-11-09","currency":"ILS","language":"he","doc_title":"Receipt for order 1001","total_paid":140,"items":[{"description":"Monthly plan","quantity":1,"unit_price":140,"vat_exempt":false,"currency":"ILS"}],"cash":{"sum":40},"credit_card":{"sum":100,"installments":1,"type":"Visa","expiry":"1230","buyer_name":"Israel Israeli","auth_number":"0123456"}}}}},"responses":{"200":{"description":"The document job was created.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"doc_id":{"type":"string","description":"The document's job ID. Use it with [Get a document](/payments/invoices/show-generated-document-by-id)."},"doc_num":{"type":"string","description":"The document number, once the invoicing service has assigned one."},"doc_status":{"type":"string","description":"Status of the document job, when the invoicing service returns one."},"doc_url":{"type":"string","description":"Link to the document."},"doc_type":{"type":"integer","description":"Document type. See [Document types](/payments/codes-statuses/document-types)."},"buyer_name":{"type":"string","description":"Buyer name on the document."},"buyer_address":{"type":"string","description":"Buyer address on the document, if sent."},"doc_date":{"type":"string","description":"Document date."},"due_date":{"type":"string","description":"Payment due date, if sent."},"pay_date":{"type":"string","description":"Payment date, if sent."},"currency":{"type":"string","description":"ISO 4217 currency code of the document."},"language":{"type":"string","description":"Document language."},"doc_title":{"type":"string","description":"Title printed at the top of the document."},"doc_comments":{"type":"string","description":"Comments printed on the document."},"exchange_rate":{"type":"number","description":"Exchange rate used on the document."},"vat_rate":{"type":"number","description":"VAT rate applied to the document."},"discount":{"type":"number","description":"Discount applied to the document."},"total_excluding_vat":{"type":"number","description":"Total before VAT."},"total_sum_after_discount":{"type":"number","description":"Total after the discount."},"total_sum_including_vat":{"type":"number","description":"Total including VAT."},"total_vat":{"type":"number","description":"Total VAT."},"total_paid":{"type":"number","description":"Total paid on this document."},"total_paid_including_vat":{"type":"number","description":"Total paid, including VAT."},"items":{"type":"array","description":"Document lines.","items":{"type":"object","properties":{"description":{"type":"string","description":"Line description."},"quantity":{"type":"integer","description":"Quantity."},"unit_price":{"type":"number","description":"Unit price before VAT."},"unit_price_with_vat":{"type":"number","description":"Unit price including VAT."},"vat_exempt":{"type":"boolean","description":"`true` if the line is exempt from VAT."},"currency":{"type":"string","description":"ISO 4217 currency code of the line."},"exchange_rate":{"type":"number","description":"Exchange rate of the line's currency."}}}},"cash":{"type":"object","description":"Cash payment recorded on the document.","properties":{"sum":{"type":"number","description":"Amount paid in cash."}}},"cheques":{"type":"array","description":"Cheques recorded on the document.","items":{"type":"object","properties":{"sum":{"type":"number","description":"Cheque amount."},"date":{"type":"string","description":"Cheque date."},"bank":{"type":"number","description":"Bank code."},"branch":{"type":"number","description":"Branch number."},"account":{"type":"string","description":"Account number."},"number":{"type":"string","description":"Cheque number."}}}},"bank_transfer":{"type":"object","description":"Bank transfer recorded on the document.","properties":{"sum":{"type":"number","description":"Amount transferred."},"date":{"type":"string","description":"Transfer date."},"account":{"type":"string","description":"Account number."}}},"paypal":{"type":"object","description":"PayPal payment recorded on the document.","properties":{"sum":{"type":"number","description":"Amount paid with PayPal."},"date":{"type":"string","description":"Payment date."},"transaction_id":{"type":"string","description":"PayPal transaction ID."},"buyer_name":{"type":"string","description":"Payer name."}}},"credit_card":{"type":"object","description":"Card payment recorded on the document. It holds no card number or CVV.","properties":{"sum":{"type":"number","description":"Amount paid by card."},"installments":{"type":"integer","description":"Number of installments."},"first_payment":{"type":"number","description":"Amount of the first installment."},"type":{"type":"string","description":"Card brand."},"expiry":{"type":"string","description":"Card expiry, `MMYY`."},"buyer_name":{"type":"string","description":"Card holder's name."},"buyer_social_id":{"type":"string","description":"Card holder's national ID."},"auth_number":{"type":"string","description":"Authorization number of the card payment."}}},"authority_redirect_url":{"type":"string","description":"Returned instead of the other fields when the seller must first approve the connection to the Israel Tax Authority. No document was created."}}},"example":{"status_code":0,"doc_id":"fa397fce-aee6-4c6d-ae9c-273ae1e3a317","doc_type":400,"buyer_name":"Israel Israeli","doc_date":"2026-11-09","currency":"ILS","language":"he","doc_title":"Receipt for order 1001","total_paid":140,"items":[{"description":"Monthly plan","quantity":1,"unit_price":140,"vat_exempt":false,"currency":"ILS"}],"cash":{"sum":40},"credit_card":{"sum":100,"installments":1,"type":"Visa","expiry":"1230","buyer_name":"Israel Israeli","auth_number":"0123456"},"doc_url":"https://invoice-staging.paymeservice.com/documents/fa397fce-aee6-4c6d-ae9c-273ae1e3a317"}}}},"400":{"description":"Validation failed (`20`), or a partner key came without a seller (`1`).","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":"What went wrong."},"status_additional_info":{"type":"object","description":"For a validation error, the messages per field, each an array of strings. Otherwise the field concerned, as a string."},"status_error_code":{"type":"integer","description":"PayMe error code: `20` for a validation error."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"The given data was invalid.","status_additional_info":{"doc_type":["The doc type field is required."],"items":["The items field is required."],"buyer_name":["The buyer name field is required."]},"status_error_code":20,"session":"FhT3aXe7"}}}},"403":{"description":"The invoicing service isn't active for this seller (`703`).","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Action is not permitted","status_additional_info":"Invoicing Service was not properly activated. Operation not permitted","status_error_code":703,"session":"FhT3aXe7"}}}},"500":{"description":"Credentials or the invoicing service failed. See the error table.","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact 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-documents","summary":"List documents","tags":["Invoices"],"description":"> ⚠️ **This API is deprecated** and is no longer recommended for use. For questions, contact partners@payme.io. \n\n## Overview\n\nLists the seller's documents, a page at a time. Send the seller's MPL in the `PayMe-Merchant-Key` header. The seller's invoicing service must be active; otherwise every documents call returns error `703` (HTTP 403).\n\nEnvironment | Example\n---|---\n`Sandbox` | `https://sandbox.payme.io/api/documents?limit=5&field=createdAt&sort=desc`\n`Production` | `https://live.payme.io/api/documents?limit=5&field=createdAt&sort=desc`\n\nEach item has the fields of [Get a document](/payments/invoices/show-generated-document-by-id), except `doc_url`. To open a document, call [Get a document](/payments/invoices/show-generated-document-by-id) with its `doc_id`. Other top-level fields, such as paging details, come from the invoicing service as they are.\n\n### Errors\n\n| HTTP | Code | When |\n|---|---|---|\n| `400` | `1` | A partner key was sent, but no seller. `status_additional_info` is `seller_payme_id`.  |\n| `400` | `20` | The seller doesn't belong to this partner. `status_additional_info` is `Merchant-Seller inconsistency`.  |\n| `403` | `703` | The invoicing service isn't active for this seller.  |\n| `500` | `1` | No credential was sent at all. `status_additional_info` is `payme_client_key`.  |\n| `500` | `251` | The seller key is unknown.  |\n| `500` | `163` | The seller isn't active.  |\n| `500` | `200` | The partner key is unknown.  |\n| `500` | `201` | The partner isn't active.  |\n| `500` | `1001` | The invoicing service returned an error. `status_additional_info` carries its code and details. |\n| `503` | `1001` | The invoicing service didn't answer in time. |\n\n","parameters":[{"name":"page","in":"query","required":false,"description":"Page number. Omit it for the first page.","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Documents per page.","schema":{"type":"integer"}},{"name":"field","in":"query","required":false,"description":"Field to sort by, for example `createdAt`.","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort order: `asc` or `desc`.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Return documents from this date.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Return documents up to this date.","schema":{"type":"string"}},{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The seller's MPL. On a GET request this header is the only way to name the seller.","schema":{"type":"string"}},{"name":"PayMe-Partner-Key","in":"header","required":false,"description":"Partners only: your partner key. The seller must belong to you (error `20`).","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of documents.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"items":{"type":"array","description":"The documents on this page.","items":{"type":"object","properties":{"doc_id":{"type":"string","description":"The document's job ID. Use it with [Get a document](/payments/invoices/show-generated-document-by-id)."},"doc_num":{"type":"string","description":"The document number, once the invoicing service has assigned one."},"doc_status":{"type":"string","description":"Status of the document job, when the invoicing service returns one."},"doc_type":{"type":"integer","description":"Document type. See [Document types](/payments/codes-statuses/document-types)."},"buyer_name":{"type":"string","description":"Buyer name on the document."},"buyer_address":{"type":"string","description":"Buyer address on the document, if sent."},"doc_date":{"type":"string","description":"Document date."},"due_date":{"type":"string","description":"Payment due date, if sent."},"pay_date":{"type":"string","description":"Payment date, if sent."},"currency":{"type":"string","description":"ISO 4217 currency code of the document."},"language":{"type":"string","description":"Document language."},"doc_title":{"type":"string","description":"Title printed at the top of the document."},"doc_comments":{"type":"string","description":"Comments printed on the document."},"exchange_rate":{"type":"number","description":"Exchange rate used on the document."},"vat_rate":{"type":"number","description":"VAT rate applied to the document."},"discount":{"type":"number","description":"Discount applied to the document."},"total_excluding_vat":{"type":"number","description":"Total before VAT."},"total_sum_after_discount":{"type":"number","description":"Total after the discount."},"total_sum_including_vat":{"type":"number","description":"Total including VAT."},"total_vat":{"type":"number","description":"Total VAT."},"total_paid":{"type":"number","description":"Total paid on this document."},"total_paid_including_vat":{"type":"number","description":"Total paid, including VAT."},"items":{"type":"array","description":"Document lines.","items":{"type":"object","properties":{"description":{"type":"string","description":"Line description."},"quantity":{"type":"integer","description":"Quantity."},"unit_price":{"type":"number","description":"Unit price before VAT."},"unit_price_with_vat":{"type":"number","description":"Unit price including VAT."},"vat_exempt":{"type":"boolean","description":"`true` if the line is exempt from VAT."},"currency":{"type":"string","description":"ISO 4217 currency code of the line."},"exchange_rate":{"type":"number","description":"Exchange rate of the line's currency."}}}},"cash":{"type":"object","description":"Cash payment recorded on the document.","properties":{"sum":{"type":"number","description":"Amount paid in cash."}}},"cheques":{"type":"array","description":"Cheques recorded on the document.","items":{"type":"object","properties":{"sum":{"type":"number","description":"Cheque amount."},"date":{"type":"string","description":"Cheque date."},"bank":{"type":"number","description":"Bank code."},"branch":{"type":"number","description":"Branch number."},"account":{"type":"string","description":"Account number."},"number":{"type":"string","description":"Cheque number."}}}},"bank_transfer":{"type":"object","description":"Bank transfer recorded on the document.","properties":{"sum":{"type":"number","description":"Amount transferred."},"date":{"type":"string","description":"Transfer date."},"account":{"type":"string","description":"Account number."}}},"paypal":{"type":"object","description":"PayPal payment recorded on the document.","properties":{"sum":{"type":"number","description":"Amount paid with PayPal."},"date":{"type":"string","description":"Payment date."},"transaction_id":{"type":"string","description":"PayPal transaction ID."},"buyer_name":{"type":"string","description":"Payer name."}}},"credit_card":{"type":"object","description":"Card payment recorded on the document. It holds no card number or CVV.","properties":{"sum":{"type":"number","description":"Amount paid by card."},"installments":{"type":"integer","description":"Number of installments."},"first_payment":{"type":"number","description":"Amount of the first installment."},"type":{"type":"string","description":"Card brand."},"expiry":{"type":"string","description":"Card expiry, `MMYY`."},"buyer_name":{"type":"string","description":"Card holder's name."},"buyer_social_id":{"type":"string","description":"Card holder's national ID."},"auth_number":{"type":"string","description":"Authorization number of the card payment."}}}}}}}},"example":{"status_code":0,"items":[{"doc_id":"fa397fce-aee6-4c6d-ae9c-273ae1e3a317","doc_type":400,"buyer_name":"Israel Israeli","doc_date":"2026-11-09","currency":"ILS","language":"he","doc_title":"Receipt for order 1001","total_paid":140,"items":[{"description":"Monthly plan","quantity":1,"unit_price":140,"vat_exempt":false,"currency":"ILS"}],"cash":{"sum":40},"credit_card":{"sum":100,"installments":1,"type":"Visa","expiry":"1230","buyer_name":"Israel Israeli","auth_number":"0123456"},"doc_num":"10023","doc_status":"completed"}]}}}},"400":{"description":"Bad request. See the error table.","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Required parameter is missing","status_additional_info":"seller_payme_id","status_error_code":1,"session":"FhT3aXe7"}}}},"403":{"description":"The invoicing service isn't active for this seller (`703`).","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Action is not permitted","status_additional_info":"Invoicing Service was not properly activated. Operation not permitted","status_error_code":703,"session":"FhT3aXe7"}}}},"500":{"description":"Credentials or the invoicing service failed. See the error table.","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Required parameter is missing","status_additional_info":"payme_client_key","status_error_code":1,"session":"FhT3aXe7"}}}}}}},"/documents/{document_id}":{"get":{"security":[{"merchantKey":[]}],"operationId":"show-generated-document-by-id","summary":"Get a document","tags":["Invoices"],"description":"> ⚠️ **This API is deprecated** and is no longer recommended for use. For questions, contact partners@payme.io. \n\n## Overview\n\nReturns a document created with [Create a document](/payments/invoices/post-create-invoice). `document_id` is the `doc_id` that call returned. The seller's invoicing service must be active; otherwise every documents call returns error `703` (HTTP 403).\n\nDocuments are created asynchronously. While the document job is still running (its status is `waiting`, `active`, `delayed`, `paused` or `stuck`), this call returns error `1005` with HTTP 400 and the status in `status_additional_info`, for example `status:waiting`. Wait a few seconds and call it again.\n\nIf the job failed, the call returns error `1003`. If the invoicing service reports an unknown job status, the response is HTTP 200 with `status_code` `0` and no document fields: call again later.\n\nExample: `GET https://sandbox.payme.io/api/documents/fa397fce-aee6-4c6d-ae9c-273ae1e3a317` with the header `PayMe-Merchant-Key: MPLDEMO-MPLDEMO-MPLDEMO-1234567`.\n\n### Errors\n\n| HTTP | Code | When |\n|---|---|---|\n| `400` | `1005` | The document is still being created. `status_additional_info` is its status, such as `status:waiting`.  |\n| `500` | `1003` | The document failed to generate.  |\n| `400` | `1` | A partner key was sent, but no seller. `status_additional_info` is `seller_payme_id`.  |\n| `400` | `20` | The seller doesn't belong to this partner. `status_additional_info` is `Merchant-Seller inconsistency`.  |\n| `403` | `703` | The invoicing service isn't active for this seller.  |\n| `500` | `1` | No credential was sent at all. `status_additional_info` is `payme_client_key`.  |\n| `500` | `251` | The seller key is unknown.  |\n| `500` | `163` | The seller isn't active.  |\n| `500` | `200` | The partner key is unknown.  |\n| `500` | `201` | The partner isn't active.  |\n| `500` | `1001` | The invoicing service returned an error. `status_additional_info` carries its code and details. |\n| `503` | `1001` | The invoicing service didn't answer in time. |\n\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"The document's `doc_id`, returned by [Create a document](/payments/invoices/post-create-invoice). ","schema":{"type":"string"}},{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The seller's MPL. On a GET request this header is the only way to name the seller.","schema":{"type":"string"}},{"name":"PayMe-Partner-Key","in":"header","required":false,"description":"Partners only: your partner key. The seller must belong to you (error `20`).","schema":{"type":"string"}}],"responses":{"200":{"description":"The document is ready.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"`0` on success."},"doc_id":{"type":"string","description":"The document's job ID. Use it with [Get a document](/payments/invoices/show-generated-document-by-id)."},"doc_num":{"type":"string","description":"The document number, once the invoicing service has assigned one."},"doc_status":{"type":"string","description":"Status of the document job, when the invoicing service returns one."},"doc_url":{"type":"string","description":"Link to the document."},"doc_type":{"type":"integer","description":"Document type. See [Document types](/payments/codes-statuses/document-types)."},"buyer_name":{"type":"string","description":"Buyer name on the document."},"buyer_address":{"type":"string","description":"Buyer address on the document, if sent."},"doc_date":{"type":"string","description":"Document date."},"due_date":{"type":"string","description":"Payment due date, if sent."},"pay_date":{"type":"string","description":"Payment date, if sent."},"currency":{"type":"string","description":"ISO 4217 currency code of the document."},"language":{"type":"string","description":"Document language."},"doc_title":{"type":"string","description":"Title printed at the top of the document."},"doc_comments":{"type":"string","description":"Comments printed on the document."},"exchange_rate":{"type":"number","description":"Exchange rate used on the document."},"vat_rate":{"type":"number","description":"VAT rate applied to the document."},"discount":{"type":"number","description":"Discount applied to the document."},"total_excluding_vat":{"type":"number","description":"Total before VAT."},"total_sum_after_discount":{"type":"number","description":"Total after the discount."},"total_sum_including_vat":{"type":"number","description":"Total including VAT."},"total_vat":{"type":"number","description":"Total VAT."},"total_paid":{"type":"number","description":"Total paid on this document."},"total_paid_including_vat":{"type":"number","description":"Total paid, including VAT."},"items":{"type":"array","description":"Document lines.","items":{"type":"object","properties":{"description":{"type":"string","description":"Line description."},"quantity":{"type":"integer","description":"Quantity."},"unit_price":{"type":"number","description":"Unit price before VAT."},"unit_price_with_vat":{"type":"number","description":"Unit price including VAT."},"vat_exempt":{"type":"boolean","description":"`true` if the line is exempt from VAT."},"currency":{"type":"string","description":"ISO 4217 currency code of the line."},"exchange_rate":{"type":"number","description":"Exchange rate of the line's currency."}}}},"cash":{"type":"object","description":"Cash payment recorded on the document.","properties":{"sum":{"type":"number","description":"Amount paid in cash."}}},"cheques":{"type":"array","description":"Cheques recorded on the document.","items":{"type":"object","properties":{"sum":{"type":"number","description":"Cheque amount."},"date":{"type":"string","description":"Cheque date."},"bank":{"type":"number","description":"Bank code."},"branch":{"type":"number","description":"Branch number."},"account":{"type":"string","description":"Account number."},"number":{"type":"string","description":"Cheque number."}}}},"bank_transfer":{"type":"object","description":"Bank transfer recorded on the document.","properties":{"sum":{"type":"number","description":"Amount transferred."},"date":{"type":"string","description":"Transfer date."},"account":{"type":"string","description":"Account number."}}},"paypal":{"type":"object","description":"PayPal payment recorded on the document.","properties":{"sum":{"type":"number","description":"Amount paid with PayPal."},"date":{"type":"string","description":"Payment date."},"transaction_id":{"type":"string","description":"PayPal transaction ID."},"buyer_name":{"type":"string","description":"Payer name."}}},"credit_card":{"type":"object","description":"Card payment recorded on the document. It holds no card number or CVV.","properties":{"sum":{"type":"number","description":"Amount paid by card."},"installments":{"type":"integer","description":"Number of installments."},"first_payment":{"type":"number","description":"Amount of the first installment."},"type":{"type":"string","description":"Card brand."},"expiry":{"type":"string","description":"Card expiry, `MMYY`."},"buyer_name":{"type":"string","description":"Card holder's name."},"buyer_social_id":{"type":"string","description":"Card holder's national ID."},"auth_number":{"type":"string","description":"Authorization number of the card payment."}}}}},"example":{"status_code":0,"doc_type":400,"buyer_name":"Israel Israeli","doc_date":"2026-11-09","currency":"ILS","language":"he","doc_title":"Receipt for order 1001","total_paid":140,"items":[{"description":"Monthly plan","quantity":1,"unit_price":140,"vat_exempt":false,"currency":"ILS"}],"cash":{"sum":40},"credit_card":{"sum":100,"installments":1,"type":"Visa","expiry":"1230","buyer_name":"Israel Israeli","auth_number":"0123456"},"doc_id":"fa397fce-aee6-4c6d-ae9c-273ae1e3a317","doc_num":"10023","doc_status":"completed","doc_url":"https://invoice-staging.paymeservice.com/documents/fa397fce-aee6-4c6d-ae9c-273ae1e3a317"}}}},"400":{"description":"Bad request. See the error table.","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Document you're requested not ready yet","status_additional_info":"status:waiting","status_error_code":1005,"session":"FhT3aXe7"}}}},"403":{"description":"The invoicing service isn't active for this seller (`703`).","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Action is not permitted","status_additional_info":"Invoicing Service was not properly activated. Operation not permitted","status_error_code":703,"session":"FhT3aXe7"}}}},"500":{"description":"Credentials or the invoicing service failed. See the error table.","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":"What went wrong, in the language you asked for (Hebrew by default)."},"status_additional_info":{"type":"string","description":"The field or value concerned. Can be `null`."},"status_error_code":{"type":"integer","description":"PayMe error code. See the error table above and [Errors](/payments/getting-started/errors)."},"session":{"type":"string","description":"PayMe session ID. Quote it when you contact support."}}},"example":{"status_code":1,"status_error_details":"Document not found","status_additional_info":null,"status_error_code":1003,"session":"FhT3aXe7"}}}}}}}}}