Documentation · Integration and authentication

Integration and authentication

Integration credentials#

The platform provides a separate API Base URL, merchant_id (Merchant Code), api_key, and api_secret for test and production environments. URLs, credentials, and orders are not interchangeable between environments. Store the Secret only on the merchant server.

Pay-in and Payout Cashier use a global-matching key (merchant_global) that is not bound to a specific channel. Payout Direct must use a merchant_channel key bound to a fixed channel. The API key must still have the corresponding payment-type, currency, and endpoint permissions.

Each request sends one currency. The creation endpoint determines pay-in or payout and requires the corresponding permission. Cashier mode shows only channels enabled for the current merchant that satisfy the order conditions, and the user selects one. Direct mode uses the channel bound to the fixed key.

Endpoint Permission Purpose
POST /api/v1/pay/create create_pay_order Create a pay-in session
POST /api/v1/pay/query query_pay_order Query pay-in
POST /api/v1/payout/create create_payout_order Create a Payout Cashier session or a Direct formal order
POST /api/v1/payout/query query_payout_order Query payout
POST /api/v1/balance/query query_balance Query balances
POST /api/v1/currency/options Valid API Key token only Query the platform currency catalog
POST /api/v1/bank/options Valid API Key token only Query platform bank and payment codes by currency
POST /api/v1/channel/options Depends on the option type; see 5.2.3 Query available channel options

Common request parameters#

All endpoints use HTTPS, POST, and Content-Type: application/json. currency/options and bank/options use only an API Key token; see 5.2.1 and 5.2.2. Other endpoints require the signature fields below. Endpoint parameter tables list only business fields.

Field Type Description
api_key string API Key for the current environment.
merchant_id string Merchant Code bound to the API Key.
timestamp string Current Unix timestamp in seconds.
nonce string New random string generated for each request.
sign string 64-character lowercase HMAC-SHA256 signature.

The request body must be a flat JSON object. Arrays, nested objects, null, duplicate fields, and trailing JSON are rejected. The maximum size is 64 KiB with at most 64 fields. Amounts use decimal strings and currencies use uppercase codes. Time fields use RFC 3339; Z in the examples means UTC.

X-Request-ID is optional and allows 1–64 ASCII letters, digits, ., _, :, and -. When an IP allowlist is configured for a signed endpoint, the calling server's public IP must match. If no allowlist is configured, the source IP is unrestricted.

Signing#

Signing algorithm: HMAC-SHA256

  1. Remove sign from the request parameters.
  2. Remove fields whose value is an empty string.
  3. Sort fields by name in ascending ASCII order.
  4. Concatenate key=value using the original scalar strings.
  5. Join with & and do not URL-encode.
  6. Use api_secret as the HMAC key to compute SHA-256.
  7. Output a 64-character lowercase hexadecimal string.

Fixed signature example:

API Secret: test_secret_123
Canonical String:
api_key=test_key&merchant_id=merchant_1001&nonce=nonce_001&platform_order_no=P202608120001&timestamp=1786502400

Signature:
03b28189b1d613de76f444db1ffb834daefd609e2eee65d4871b34db8818bd73

The platform configures the time window, typically ±300 seconds. The same API Key must not reuse a nonce within the valid window. Generate a new timestamp, nonce, and sign for every retry.

Search docs