# Payments > 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. ## Machine-readable - [Payments OpenAPI spec](https://docs-staging.payme.io/payments-migrated/openapi.json): the OpenAPI document (also as [YAML](https://docs-staging.payme.io/payments-migrated/openapi.yaml)) - [Payments tool definitions](https://docs-staging.payme.io/api/v1/projects/payments-migrated/api/tools.json): one function-calling tool per endpoint - [Payments full text](https://docs-staging.payme.io/payments-migrated/llms-full.txt): every Payments page in one file - Markdown: append `.md` to any page URL for that page as Markdown - Source: append `.yaml` to an endpoint page URL (a line that reads `METHOD path — summary`) for its source YAML; guide pages have no YAML ## Getting Started - [Start Here](https://docs-staging.payme.io/payments-migrated/getting-started/start-here): Reading order for developers and AI coding agents integrating the PayMe Payments API: 1) PayMe at a glance, 2) Authentication (seller_payme_id/MPL, payme_client_key, public key), 3) Environments (sandbox.payme.io vs live.payme.io), 4) Quickstart (generate-sale, pay, callback, refund-sale), 5) Callbacks (form-encoded POST, notify_type, payme_signature). Then Errors and Idempotency & Retries. - [PayMe at a Glance](https://docs-staging.payme.io/payments-migrated/getting-started/payme-at-a-glance): PayMe is a payments provider whose Payments API lets platforms and merchants accept payments through a hosted payment page, hosted fields (JSAPI) or a direct API, with tokenization, subscriptions, refunds, authorization and capture, 3D Secure, invoices and point-of-sale. Other APIs: B2B Payments, Keep (accounting) and Products & Customers. Payment methods include cards, Bit, Apple Pay, Google Pay, PayPal, bank transfer, SEPA, BACS and Israeli direct debit. Sandbox: sandbox.payme.io/api; production: live.payme.io/api. - [Authentication](https://docs-staging.payme.io/payments-migrated/getting-started/authentication): Payments API requests carry credentials in the JSON body, not an Authorization header: seller_payme_id (the MPL, identifies the seller) on almost every call, and payme_client_key (PayMe partner key) on refunds, seller management and query APIs. Some endpoints take them as headers PayMe-Merchant-Key / PayMe-Partner-Key. A public key (PayMe-Public-Key) is used from the browser for Hosted Fields and 3D Secure. Keep uses OAuth2 client credentials; Products & Customers uses a JWT from POST /auth/token. - [Environments](https://docs-staging.payme.io/payments-migrated/getting-started/environments): PayMe has two environments: Sandbox at https://sandbox.payme.io/api/ and Production at https://live.payme.io/api/; use matching credentials for each. Test only in the sandbox with the documented test cards. The sandbox generate-sale example returns sale_url on preprod.paymeservice.com, while other examples show sandbox.payme.io — the reason is not documented. Hosted Fields and Apple/Google Pay JS use testMode: true for the sandbox. - [Quickstart](https://docs-staging.payme.io/payments-migrated/getting-started/quickstart): End-to-end sandbox walkthrough. 1) POST https://sandbox.payme.io/api/generate-sale with seller_payme_id, sale_price (minor units, min 500), currency, product_name, transaction_id, sale_callback_url, sale_return_url, language en; response has sale_url and payme_sale_id. 2) Open sale_url and pay with test card 5326105300985846 12/30 CVV 658. 3) PayMe POSTs a form-encoded callback with notify_type sale-complete. 4) POST /refund-sale with payme_client_key, seller_payme_id, payme_sale_id and optional sale_refund_amount. - [Callbacks](https://docs-staging.payme.io/payments-migrated/getting-started/callbacks): PayMe callbacks (also called IPN) are server-to-server POST requests with an x-www-form-urlencoded body sent to sale_callback_url, or to the merchant's default callback URL. notify_type is one of sale-complete, sale-authorized, refund, sale-failure, sale-chargeback, sale-chargeback-refund. The payload includes status_code, payme_sale_id, transaction_id, sale_status, price, currency, buyer_key (when capture_buyer was set) and payme_signature (documented as an MD5 signature; algorithm and inputs not documented). - [Errors](https://docs-staging.payme.io/payments-migrated/getting-started/errors): Payments API errors return status_code 1 with status_error_code (numeric code), status_error_details (message, Hebrew by default; send language en for English) and status_additional_info (often the offending field name). Documented examples return errors with HTTP 500, so check status_code in the body. Codes seen in the docs: 1 missing parameter, 20 validation, 200 service not found (wrong client key), 251 user link / seller not found, 305 wrong sale status, 356 invalid card expiry, 600 buyer not found, 720 service not activated, 901 invalid JSON, 906 withdrawal not found. - [Idempotency and Retries](https://docs-staging.payme.io/payments-migrated/getting-started/idempotency-and-retries): PayMe documents no idempotency key. transaction_id is your own order ID for correlation; whether PayMe rejects duplicates is not documented. Retrying refund-sale is dangerous: several partial refunds per sale are allowed up to the sale total, so a repeated partial refund is a second refund. Capture runs once; an authorization lasts up to 168 hours. Before retrying a request that timed out, check the sale with POST /get-sales (sale_payme_id) and its sale_status. Rate limits for the Payments API are not documented. ## Introduction - [Getting Started](https://docs-staging.payme.io/payments-migrated/introduction/getting-started): Our API is designed to allow platforms to offer a full payment solution as part of their product. - [Sandbox and Production URLs](https://docs-staging.payme.io/payments-migrated/introduction/sandbox-and-production-urls): In order to work with the API, you should use the service URLs according to the required environments, Sandbox or Production.When interacting with the API, make sure you point to the correct environment, with the correct credentials. Both URLs will be stated next to each function. - [Test Cards and Payment Methods](https://docs-staging.payme.io/payments-migrated/introduction/test-cards-and-payment-methods): Please use the following credit card when integrating only in the **Sandbox** environment. - [Value Added Services](https://docs-staging.payme.io/payments-migrated/introduction/value-added-services): At PayMe, We go beyond traditional financial solutions to offer a comprehensive suite of value-added services. These services are designed to enhance our clients' financial experiences and empower them with the tools they need for success. From the creation of invoices and security services to seamless integration with third-party platforms, our value-added services cater to the diverse needs of your business. - [Payment Options](https://docs-staging.payme.io/payments-migrated/introduction/payment-options): We have three integration options: - [Hosted Payment Page](https://docs-staging.payme.io/payments-migrated/hosted-payment-page/post-generate-sale) - [Hosted Fields - JSAPI](https://docs-staging.payme.io/guides-and-use-cases-migrated/integrations/hosted-fields-jsapi-guide) - [Direct API](https://docs-staging.payme.io/guides-and-use-cases-migrated/integrations/direct-api-how-to-create-and-pay-sale) ## Hosted Payment Page - [Generate Payment](https://docs-staging.payme.io/payments-migrated/hosted-payment-page/post-generate-sale): POST /generate-sale — Generate Payment - [Generate Multi Checkout Payment](https://docs-staging.payme.io/payments-migrated/hosted-payment-page/post-generate-sale-2): POST /generate-sale/ — Generate Multi Checkout Payment ## Hosted Fields - JSAPI - [Generate Payment with Token](https://docs-staging.payme.io/payments-migrated/hosted-fields-jsapi/post-generate-sale-hosted-fields-jsapi): How to call POST /generate-sale for Hosted Fields - JSAPI. ## Direct API - [Available Payment Methods](https://docs-staging.payme.io/payments-migrated/direct-api/available-payment-methods): As PayMe offers different payment methods, you can use the `sale_payment_method` parameter in [`generate-sale`](https://docs-staging.payme.io/payments-migrated) to set your desired payment method. - [Pay Sale](https://docs-staging.payme.io/payments-migrated/direct-api/post-pay-sale): POST /pay-sale — Pay Sale ## Point of Sale (POS) - [Order New POS Device](https://docs-staging.payme.io/payments-migrated/point-of-sale-pos/post-vas-enable): POST /vas-enable — Order New POS Device - [Pair New Device](https://docs-staging.payme.io/payments-migrated/point-of-sale-pos/post-pair): POST /vas/pos/pair — Pair New Device - [Authenticate New Device](https://docs-staging.payme.io/payments-migrated/point-of-sale-pos/post-authenticate): POST /vas/pos/authenticate — Authenticate New Device - [New POS Payment](https://docs-staging.payme.io/payments-migrated/point-of-sale-pos/post-payment): POST /sales — New POS Payment - [Refund POS Sale](https://docs-staging.payme.io/payments-migrated/point-of-sale-pos/put-sales): PUT /sales — Refund POS Sale ## Post Sale Actions - [Refund Sale](https://docs-staging.payme.io/payments-migrated/post-sale-actions/post-refund-sale): POST /refund-sale — Refund Sale - [Void Sale](https://docs-staging.payme.io/payments-migrated/post-sale-actions/void-sale): How to call POST /refund-sale for Post Sale Actions. - [Capture Sale](https://docs-staging.payme.io/payments-migrated/post-sale-actions/post-capture-sale): POST /capture-sale — Capture Sale - [Cancel Multi Payment Page](https://docs-staging.payme.io/payments-migrated/post-sale-actions/post-cancel-template): POST /cancel-template — Cancel Multi Payment Page ## Apple Pay - [Activate Service (Apple Pay)](https://docs-staging.payme.io/payments-migrated/apple-pay/post-vas-enable-apple-pay): How to call POST /vas-enable for Apple Pay. - [Generate Sale with Apple Pay](https://docs-staging.payme.io/payments-migrated/apple-pay/post-generate-sale-apple-pay): How to call POST /generate-sale for Apple Pay. ## Google Pay - [Activate Service (Google Pay)](https://docs-staging.payme.io/payments-migrated/google-pay/post-vas-enable-google-pay): How to call POST /vas-enable for Google Pay. - [Generate Sale with Google Pay](https://docs-staging.payme.io/payments-migrated/google-pay/post-generate-sale-google-pay): How to call POST /generate-sale for Google Pay. ## IL Direct Debit - [Generate New Authorization](https://docs-staging.payme.io/payments-migrated/il-direct-debit/post-generate-sale-il-direct-debit): How to call POST /generate-sale for IL Direct Debit. - [Generate New Payment](https://docs-staging.payme.io/payments-migrated/il-direct-debit/post-generate-sale-2-il-direct-debit): How to call POST /generate-sale for IL Direct Debit. ## Subscriptions - [Generate](https://docs-staging.payme.io/payments-migrated/subscriptions/post-generate-subscription): POST /generate-subscription — Generate - [Recurring Payments](https://docs-staging.payme.io/payments-migrated/subscriptions/recurring-payments): Recurring payments help you to oversee regular payments for subscriptions, providing convenience to customers and predictable revenue streams for your business. - [Pay](https://docs-staging.payme.io/payments-migrated/subscriptions/post-generate-subscription-2): POST /pay-subscription — Pay - [Cancel](https://docs-staging.payme.io/payments-migrated/subscriptions/postcancel-subscription): POST /cancel-subscription — Cancel - [Pause](https://docs-staging.payme.io/payments-migrated/subscriptions/post-pause-subscription): POST /pause-subscription — Pause - [Resume](https://docs-staging.payme.io/payments-migrated/subscriptions/patch-subscriptions-sub-payme-id-resume): PATCH /subscriptions/{sub_payme_id}/resume — Resume - [Update Price](https://docs-staging.payme.io/payments-migrated/subscriptions/patch-subscriptions-sub-id-set-price): PATCH /subscriptions/{sub_id}/set-price — Update Price ## Tokenization - [Capture Buyer Token](https://docs-staging.payme.io/payments-migrated/tokenization/post-capture-buyer-token): POST /capture-buyer-token — Capture Buyer Token - [Generate Sale with Token](https://docs-staging.payme.io/payments-migrated/tokenization/post-generate-sale-tokenization): How to call POST /generate-sale for Tokenization. - [Get Buyer Key](https://docs-staging.payme.io/payments-migrated/tokenization/post-get-buyer-key): POST /get-buyer-key — Get Buyer Key - [Get card details by token](https://docs-staging.payme.io/payments-migrated/tokenization/post-buyer-token-to-card-number): POST /buyer-token-to-card-number — Get card details by token ## Merchants Management - [Create Seller](https://docs-staging.payme.io/payments-migrated/merchants-management/post-create-seller): POST /create-seller — Create Seller - [Update Seller](https://docs-staging.payme.io/payments-migrated/merchants-management/post-update-seller): POST /update-seller — Update Seller - [Upload Seller Files](https://docs-staging.payme.io/payments-migrated/merchants-management/post-upload-seller-files): POST /upload-seller-files — Upload Seller Files - [Retrieve Seller's Additional Services Data](https://docs-staging.payme.io/payments-migrated/merchants-management/post-get-vas-seller): POST /get-vas-seller — Retrieve Seller's Additional Services Data - [Withdraw Balance](https://docs-staging.payme.io/payments-migrated/merchants-management/post-withdraw-balance): POST /withdraw-balance — Withdraw Balance - [Get Seller Public Key](https://docs-staging.payme.io/payments-migrated/merchants-management/get-sellers-mpl-public-keys): GET /sellers/{seller_payme_id}/public-keys — Get Seller Public Key - [Delayed Market Fee](https://docs-staging.payme.io/payments-migrated/merchants-management/patch-sales-guid-external-market-fee): PATCH /sales/{guid}/external-market-fee — Delayed Market Fee - [Create Individual](https://docs-staging.payme.io/payments-migrated/merchants-management/post-sellers-mpl-key-individuals): POST /sellers/{mpl_key}/individuals — Create Individual - [Update Individual](https://docs-staging.payme.io/payments-migrated/merchants-management/post-sellers-mpl-key-individuals-2): POST /sellers/{mpl_key}/individuals/{individual_key} — Update Individual - [Get-Individuals by Company ID](https://docs-staging.payme.io/payments-migrated/merchants-management/get-sellers-mpl-key-individuals): GET /sellers/{mpl_key}/individuals — Get-Individuals by Company ID - [Get Partner Data](https://docs-staging.payme.io/payments-migrated/merchants-management/get-partners): GET /partners — Get Partner Data - [GET Mids](https://docs-staging.payme.io/payments-migrated/merchants-management/get-sellers-mpl-key-mids): GET /sellers/{mpl_key}/mids — GET Mids - [Business Fields](https://docs-staging.payme.io/payments-migrated/merchants-management/get-business-fields): GET /business-fields — Business Fields ## Buyers Management - [Get Customer Details](https://docs-staging.payme.io/payments-migrated/buyers-management/get-buyers-guid): GET /buyers/{buyer_guid} — Get Customer Details ## Generate a Sale with 3D Secure - [Generate Sale with 3D Secure](https://docs-staging.payme.io/payments-migrated/generate-a-sale-with-3d-secure/post-generate-sale-generate-a-sale-with-3d-secure): How to call POST /generate-sale for Generate a Sale with 3D Secure. ## Standalone 3D Secure service - [Initialize 3DSecure Request](https://docs-staging.payme.io/payments-migrated/standalone-3d-secure-service/post-initialize-3dsecure-request): POST /sales/payme_sale_id/3ds — Initialize 3DSecure Request - [Resolve Secured Hash](https://docs-staging.payme.io/payments-migrated/standalone-3d-secure-service/get-sales-payme-sale-id-3ds-hash): GET /sales/payme_sale_id/3ds/hash — Resolve Secured Hash ## Invoices - [Create Document](https://docs-staging.payme.io/payments-migrated/invoices/post-create-invoice): POST /documents — Create Document - [Get Generated Document By ID](https://docs-staging.payme.io/payments-migrated/invoices/show-generated-document-by-id): GET /documents/document_id — Get Generated Document By ID - [Show Generated Document By ID](https://docs-staging.payme.io/payments-migrated/invoices/show-generated-document-by-id-2): GET /show-documents/document_id — Show Generated Document By ID - [Query Existing Documents](https://docs-staging.payme.io/payments-migrated/invoices/get-documents): GET /documents — Query Existing Documents ## Query APIs - [List Sales](https://docs-staging.payme.io/payments-migrated/query-apis/post-get-sales): POST /get-sales — List Sales - [Reporting & Data](https://docs-staging.payme.io/payments-migrated/query-apis/reporting-data): Access preconfigured reports to gain insight into essential activities, such as sales, transactions, subscriptions, and balance adjustments. - [List Transactions](https://docs-staging.payme.io/payments-migrated/query-apis/post-get-transactions): POST /get-transactions — List Transactions - [List Subscriptions](https://docs-staging.payme.io/payments-migrated/query-apis/post-get-subscriptions): POST /get-subscriptions — List Subscriptions - [List Sellers](https://docs-staging.payme.io/payments-migrated/query-apis/post-get-sellers): POST /get-sellers — List Sellers - [List Past Withdrawals](https://docs-staging.payme.io/payments-migrated/query-apis/post-get-withdrawals): POST /get-withdrawals — List Past Withdrawals - [List Future Withdrawals](https://docs-staging.payme.io/payments-migrated/query-apis/get-future-withdrawals): POST /get-future-withdrawals — List Future Withdrawals - [Aggregated Wallets Data](https://docs-staging.payme.io/payments-migrated/query-apis/get-funds-transfer-aggregated): GET /funds-transfer/aggregated — Aggregated Wallets Data - [List of available banks](https://docs-staging.payme.io/payments-migrated/query-apis/get-banks-country-iso-code): GET /banks/{country_iso_code} — List of available banks - [Wallet to Wallet transfers](https://docs-staging.payme.io/payments-migrated/query-apis/get-funds-transfer): GET /funds-transfer — Wallet to Wallet transfers - [Withdrawal Correlation](https://docs-staging.payme.io/payments-migrated/query-apis/post-credit-match): POST /credit-match — Withdrawal Correlation ## Get Transaction Statistics - [Get Transaction Statistics](https://docs-staging.payme.io/payments-migrated/get-transaction-statistics/post-get-transaction-statistics): POST /get-transaction-statistics — Get Transaction Statistics ## Get Transaction Data - [Get Transaction Data](https://docs-staging.payme.io/payments-migrated/get-transaction-data/post-get-transaction-data): POST /get-transaction-data — Get Transaction Data ## iOS SDK - [iOS SDK](https://docs-staging.payme.io/payments-migrated/ios-sdk/ios-sdk): You can use the PayMe (Isracard Global) iOS SDK to implement payments on iOS devices. The guide covers building and importing the PMLib.framework, initializing the SDK, and integrating the Isracard Global API to pay a sale, pay a subscription, and capture a buyer.