Skip to main content

Resources and configuration

Configure your sandbox and production environment to ensure API requests are optimal.

Checkout Protocol​

Checkout Protocol API resources.

Authentication request​

Authenticate to the APIs and start using the Checkout.

Endpoint: POST {CHECKOUT_URL}/api/v1/session

Header: Content-Type: application/json

Common parameters for Checkout Protocol​

These apply to all operations (purchase, debit, credit, transfer). Operation-specific extras are listed in each API call.

ParameterTypeRequiredDescription
merchant_keystringyesYour merchant key from admin panel.
operationstringyesOne of purchase, debit, credit, transfer.
success_urlstring (URL, ≤1024)yesWhere to redirect after a successful payment. May contain query parameters.
cancel_urlstring (URL, ≤1024)noWhere to redirect when the customer closes the form. Trigger conditions configurable via "Maximum count declines" in Protocol Mappings.
expiry_urlstring (URL, ≤1024)noRedirect target when the session expires before completion.
url_targetstringnoHTML browsing context for return: _self, _parent, _top.
session_expiryinteger (1–720)noSession lifetime in minutes. Default 60.
channel_idstring (≤16)noRoutes the payment to a specific MID (Merchant Mapping). Configured in admin panel. If used together with methods, the MID must support the chosen method.
hashstringyesRequest signature. See hash signature.
orderobjectyesSee below.
order.numberstring (3–255)yesYour unique order identifier. Idempotency key: see idempotency.
order.amountstringyesDecimal string. Format depends on the currency exponent. See Amount format.
order.currencystring (3 chars fiat / 3–6 chars crypto)yesISO 4217 for fiat.
order.descriptionstring (2–1024)yesHuman-readable product name shown on the receipt.
customerobjectconditionalRequired when the chosen payment method needs it. If omitted, Checkout asks the customer to fill the missing fields.
customer.namestring (2–200, Latin basic [a-zA-Z])conditionalCustomer's name. Its validation (including whether the field is required) is governed by the Protocol Mapping settings. If it is not specified in the request, the Checkout page shows it — when a payment method needs it — as the Cardholder field. Example: John Doe.
customer.emailstring (email)conditional
customer.birth_datestring (yyyy-mm-dd, ISO 8601)conditionalRequired by some APMs.
billing_addressobjectconditionalRequired by AVS / 3DS / some APMs.
billing_address.countrystring (alpha-2)conditionalISO 3166-1.
billing_address.statestring (2–32)optionalRegion code without the country prefix, for example CA (California, US), ANT (Antioquia, CO), 01 (Baringo, KE). Not checked against the region list. If omitted, Checkout asks the customer to choose the region from a list when the country has one and a payment provider requires the state; see General fields. Region codes of 1 character (some regions of AR, BO, CR, EC, EG, PA, PY, TH) cannot be sent in this field because of the 2-character minimum; the customer can still choose them on Checkout.
billing_address.citystring (2–40)conditional
billing_address.addressstring (2–255)conditional
billing_address.house_numberstring (1–9)optional
billing_address.zipstring (2–10)conditional
billing_address.phonestring (1–32, digits/+()-)conditional
billing_address.phone_country_codestringoptionalE.g., +380.
billing_address.districtstring (2–32)optional
billing_address.languagestringoptionalLanguage for the billing context, e.g. UA (case-insensitive).
parametersobjectoptionalExtra parameters required by a specific payment method. Keyed by method name: parameters.card.foo, parameters.paypal.bar.
custom_dataobjectoptionalArbitrary key-value data that will be echoed back in the callback.

General fields for Checkout Page​

The fields the Checkout page renders, their limitations and the error strings returned on validation failure are documented on the Checkout page guide.

Operation-specific parameters​

ParameterTypeOperationsDescription
methodsarray of stringsall operationsRestricts the methods shown on the Checkout page (e.g. ["card","paypal"]). If omitted, pre-routing rules apply.
req_tokenboolean (default false)purchase, debitWhen true, Checkout returns a card_token in the callback for future tokenized payments. Ignored if card_token is supplied.
card_tokenarray of strings (each 64 chars)purchase, debitUse a previously saved token to skip card-data entry. A payout to a saved token is a separate request, not a Checkout session: see Card credit, where card_token replaces the card data and payee_first_name / payee_last_name name the recipient.
authstring, Y or N (default N)purchase onlyAuthenticate only, do not capture. This is the two-step Dual Message System (DMS) flow; see DMS mode. When Y, routing selects DMS or SMS/DMS (both) MIDs and the capture-type logic applies.
recurring_initboolean (default false)purchase, debitInitializes a recurring chain. Once the initializing transaction settles, recurring_token (and recurring_init_trans_id for purchase) is returned in the response and the callback. Subsequent recurring payments use /api/v1/payment/recurring.
schedule_idstringpurchase, debit, when recurring_init=trueSchedule for recurring billing. Schedules are not separated by operation type.
vat_calcboolean (default false)purchase onlyEnables VAT calculation for this payment.
customer_tokenstring (≤64)purchase, debit (alternative payment methods)Token of the payer's linked bank account from the callback of an earlier payment made with Bank Account Linking. Send it so that the payer does not link the account again. Works only when Bank Account Linking is enabled in your Checkout protocol mapping. Not part of the hash.
payeeobjecttransfer, creditRecipient details. See below.
payee.namestring (2–32, Latin)transfer, creditRequired.
payee.emailstring (email)transfer, creditConditional.
payee_billing_address.*objecttransfer, creditSame shape as billing_address.
crypto.networkstring (≤50)any with crypto methodsNetwork to display, e.g. ERC20, TRC20, solana, polygon.
form_idstring (UUID)anyIdentifier for a custom payment form. See the Checkout SDK documentation.

Amount format​

order.amount is a string. Its format depends on the currency exponent:

Currency exponentFormatExamples
0 (e.g., JPY, KRW, CLP, UGX)"XX.XX" (with trailing zeros)"1000.00"
2 (most fiat: USD, EUR, UAH, ...)"XX.XX""100.99"
3 (BHD, KWD, ...)"XXX.XXX""100.999"
4 (CLF, ...)"XXX.XXXX""100.9999"
CryptoUse the exponent appropriate for the asset"0.00000001" for BTC

Special cases:

  • purchase with crypto: omit amount entirely (and exclude it from the hash) when the customer enters the amount on a third-party UI (e.g., wallet app).
  • transfer with amount = -1: shows an empty amount field on Checkout so the customer can enter it.

Idempotency​

tip

order.number is not globally unique in the system — multiple merchants can reuse the same value. Use a unique order.number for each payment attempt so you can reliably match callbacks to orders. To limit a customer to one attempt per session, set Maximum number of declines to 1 in admin panel > Protocol mapping.

Server-side protections. Payment Platform rejects repeated requests in four cases. Each one has its own scope, window and response:

ProtectionApplies toWindowResponse
Identical requestAll S2S CARD and S2S APM requests except status and details requests10 seconds. For VERIFY requests, 30 seconds, unless Allow multiple Verify requests is enabled in admin panel > Protocol mappingHTTP 400, Duplicate request.
order_id already usedS2S SALE, AUTH, DEBIT, TRANSFER, CARD2CARD, RECURRING_SALE, RECURRING_AUTH, RECURRING_DEBIT and the same operations for virtual accounts24 hours, counted from the moment the payment becomes pending or settled. A declined payment does not block the order_id. Not applied to merchants in test mode100000, order_id: Duplicate payment.
Same card or identifier in progressS2S SALE, AUTH, DEBIT, CREDIT and the virtual account Sale, Auth, DebitUntil the previous request with the same card number, card token or identifier is completed, up to 1 hour. Not applied to merchants in test modeHTTP 400, Previous payment not completed.
Request in progressCheckout: credit, recurring, capture and void requests60 seconds, while the first request with the same order (or payment ID) is being processedHTTP 400, Request with the same order is already in progress.

Example of the first response:

{ "error_code": "400", "error_message": "Duplicate request." }

These protections cover accidental double-submits (network retries, double-clicks). They are not a replacement for your own idempotency:

  • S2S CREDIT is not checked by order_id. If you repeat a CREDIT with the same order_id after the first one is completed, it is processed again and you pay out twice. Before a retry, check the result of the first request with GET_TRANS_STATUS.
  • After a Checkout credit, recurring, capture or void request is completed, a repeated request with the same order is processed again.
  • Creating a Checkout session does not check order.number for duplicates. Every request creates a new session.

Recommended pattern: generate a UUID (or your own monotonic ID) for each payment attempt your customer makes; do not reuse it across cart-abandon retries.

Responses​

On success the API returns:

{
"redirect_url": "https://checkout-sandbox.example.com/p/abc123",
}

On validation failure the API returns 400 Bad Request with errors[]. See Error reference.

Examples​

Purchase (one-step, card, with billing address)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-656c-...-7e11ae873370",
"operation": "purchase",
"methods": ["card"],
"session_expiry": 60,
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "USD",
"description": "Important gift"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"expiry_url": "https://example.com/expiry",
"url_target": "_parent",
"customer": {
"name": "John Doe",
"email": "[email protected]"
},
"billing_address": {
"country": "US",
"state": "CA",
"city": "Los Angeles",
"address": "Moor Building 35274",
"zip": "123456",
"phone": "347771112233"
},
"req_token": true,
"hash": "<sha1(md5(uppercase(order.number+amount+currency+description+password)))>"
}'
Debit (charge with a saved token)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-...-7e11ae873370",
"operation": "debit",
"methods": ["card"],
"card_token": ["f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97075ee5e539bb662fceff4dc1"],
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "USD",
"description": "Important gift"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"customer": { "name": "John Doe", "email": "[email protected]" },
"hash": "<auth signature>"
}'
Transfer (P2P)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-...-7e11ae873370",
"operation": "transfer",
"order": {
"number": "order-1234",
"amount": "100.55",
"currency": "USD",
"description": "P2P transfer"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"customer": { "name": "John Doe", "email": "[email protected]" },
"payee": { "name": "Jane Doe", "email": "[email protected]" },
"billing_address": { "country": "US", "state": "CA", "city": "Los Angeles", "address": "Moor Building 35274", "zip": "94538", "phone": "0987654321" },
"payee_billing_address": { "country": "US", "state": "NY", "city": "New York", "address": "123 Park Ave", "zip": "10001", "phone": "0987654321" },
"hash": "<auth signature>"
}'
Credit (payout)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-...-7e11ae873370",
"operation": "credit",
"methods": ["airtel"],
"order": {
"number": "order-1234",
"amount": "100.55",
"currency": "USD",
"description": "Reward payout"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"payee_billing_address": { "country": "US", "phone": "347771112255" },
"hash": "<auth signature>"
}'

Errors​

The Payments APIs use standard HTTP status codes to indicate the success or failure of a request.

Status CodeDescription
200OK
201Created
204No Content
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Too Many Requests
500Internal Server Error

We also return a code and message in the response body for each error. Learn more about error codes in Error handling.