Responses and order conventions
Response structure#
| Field | Type | Description |
|---|---|---|
code |
integer | 0 means the request succeeded; a non-zero value is a business error. |
message |
string | Response description. |
data |
object / null | Success data; null on error. |
request_id |
string | Request trace identifier. |
message_key |
string | Error identifier, returned only in error responses. |
default_message |
string | Default error description, returned only in error responses. |
{
"code": 50006,
"message_key": "error.cashier_unavailable",
"default_message": "cashier session unavailable",
"message": "cashier session unavailable",
"data": null,
"request_id": "req_01JEXAMPLE"
}
The HTTP status is usually 200. Determine the request result from JSON code. Request success and transaction success must be evaluated separately.
Cashier session#
On the first successful creation, the endpoint returns the following data fields:
| Field | Type | Description |
|---|---|---|
checkout_mode |
string | cashier |
platform_order_no |
string | Platform order number. |
merchant_order_no |
string | Merchant order number. |
amount |
string | Transaction amount. |
requested_amount |
string | Original requested amount, returned by pay-in creation. |
currency |
string | Transaction currency. |
status |
string | awaiting_payment_method |
payment_url |
string | Cashier URL, returned only by creation. Store it and give it to the user unchanged. |
expired_at |
string | Session expiration time. |
No formal order exists when a session is created. A session query does not return payment_url, a channel, or fees. After a formal order is created, the query prioritizes it, and checkout_mode=direct indicates the formal-order stage. Payout Direct returns this mode from creation; Payout Cashier queries also return it after the user confirms and a formal order is created.
| Session status | Description |
|---|---|
awaiting_payment_method |
Waiting for the user to select a channel. |
selecting |
The selection or submission is being confirmed; continue querying. |
submitted |
Submitted; query the formal order. |
expired |
The session has expired. |
The token in payment_url is sensitive and must not be written to logs or analytics parameters. Do not modify the URL or reuse it across orders.
Retries and return URLs#
- Creation idempotency: Use a unique, persisted
merchant_order_no. Repeating creation with the same order number and business content returns the original session or order; changing a key field returns a conflict. A retry must keep the original business parameters, includingreturn_urland prefilled data. After the user edits the data, the merchant still retries with the original parameters. The data is locked after confirmation. - Indeterminate result: A non-zero
code, network interruption, or timeout alone cannot establish transaction failure. Store the order number andrequest_id, query with the original order number, and do not create a duplicate using a different order number. - Browser return: After the payment page returns to the same cashier, it displays the current order status. When a pay-in is
paidand a return URL exists, the page provides a “Return to merchant now” button and a 10-second countdown. Failure, closed, expired, and payout pages support a manual return. A browser redirect is not proof of transaction success.
Channel maintenance#
A channel in maintenance stops accepting new orders, while existing formal orders continue under the original rules. maintenance is a channel status, not an order or cashier-session status value.
| Stage when maintenance is enabled | Handling |
|---|---|
| New creation request or cashier session without a formal order | A maintenance channel cannot be selected. Another active channel that satisfies authorization, currency, amount, rate, and other conditions may be selected. Having only a payment_url or platform order number does not mean a formal order exists. |
| Formal order created but not yet submitted to the payment channel | Continue using the original channel and allow submission under the original idempotency and validity rules. Do not create another order or freeze funds again. |
| Submitted formal order | Continue processing transaction results, order queries, and asynchronous notifications. Maintenance itself does not change the order to failed or release frozen funds. |
Maintenance itself does not block local pay-in queries, payout queries, or status synchronization for processing orders through sync_provider=true. It also does not affect merchant balance queries. All requests must still pass the original signature, permission, and order-ownership checks, and asynchronous notifications still require signature verification and deduplication. Expired or terminal orders are not reopened for submission because of maintenance.
/api/v1/channel/options returns only options currently available for new orders and excludes maintenance channels. Currency and bank catalogs do not represent a channel's transaction availability. For maintenance errors and retry guidance, see Error codes.