Query Payment Order#
Look up an order by its platform order ID or merchant order ID. Use the same API key that created it.
POST
/api/v6/pay/onchainos-payment/queryThe query endpoint accepts either order ID and requires the same API key as the create request.
Request Parameters#
| Field | Type | Required | Description |
|---|---|---|---|
paymentIntentId | String | One of the two fields | Platform order ID returned by the create endpoint. Maximum 32 characters. |
merchantPaymentId | String | One of the two fields | Merchant order ID. Maximum 64 characters. |
Provide exactly one of these fields.
Request Example by Platform Order ID#
bash
curl --request POST 'https://web3.okx.com/api/v6/pay/onchainos-payment/query' \
--header "OK-ACCESS-KEY: ${OK_ACCESS_KEY}" \
--header "OK-ACCESS-SIGN: ${OK_ACCESS_SIGN}" \
--header "OK-ACCESS-PASSPHRASE: ${OK_ACCESS_PASSPHRASE}" \
--header "OK-ACCESS-TIMESTAMP: ${OK_ACCESS_TIMESTAMP}" \
--header 'Content-Type: application/json' \
--data-raw '{"paymentIntentId":"2026110600000123456789012345678901"}'
Request Body by Merchant Order ID#
json
{
"merchantPaymentId": "order_20261106_0001"
}
Response Parameters#
The response includes these fields in data.
| Field | Type | Description |
|---|---|---|
merchantPaymentId | String | Merchant order ID. |
paymentIntentId | String | Platform payment order ID. |
status | String | Current order status. See Payment Flow for status definitions. |
to | String | Recipient address. |
txHash | String / null | Payment transaction hash. It is null until available. A hash can be available before settlement. |
fiatAmount | String | Reference fiat amount provided when the order was created. |
fiatCurrency | String | Reference fiat currency provided when the order was created. |
paymentToken | Object / null | Token and amount actually paid. Usually null while payment is pending or processing. |
expiresAt | String | Order expiration in ISO 8601 UTC format. |
merchantDisplayName | String / null | Optional merchant display name from order creation. Null if omitted. |
qrContent | String / null | OKX Pay QR code content is unavailable. |
When paymentToken is present, it contains these fields.
| Field | Type | Description |
|---|---|---|
chainId | String | Payment network's chain ID, currently "196". |
tokenSymbol | String | Token symbol. |
tokenAddress | String | Token contract address. |
tokenDecimal | Integer | Number of token decimals. |
tokenAmount | String | Amount actually paid, in the token's smallest unit. |
Save the checkout URL and order details returned by the create endpoint. The query response excludes checkoutUrl and the full quote list.
Pending Payment Response#
json
{
"code": 0,
"msg": "",
"data": {
"merchantPaymentId": "order_20261106_0001",
"paymentIntentId": "2026110600000123456789012345678901",
"status": "pending",
"to": "0x1111111111111111111111111111111111111111",
"txHash": null,
"fiatAmount": "10.00",
"fiatCurrency": "USD",
"paymentToken": null,
"expiresAt": "2026-11-06T04:30:00Z",
"merchantDisplayName": null
}
}
Settled Payment Response#
json
{
"code": 0,
"msg": "",
"data": {
"merchantPaymentId": "order_20261106_0001",
"paymentIntentId": "2026110600000123456789012345678901",
"status": "settled",
"to": "0x1111111111111111111111111111111111111111",
"txHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"fiatAmount": "10.00",
"fiatCurrency": "USD",
"paymentToken": {
"chainId": "196",
"tokenSymbol": "USDC",
"tokenAddress": "0xb6ceceab302e2e4948951ee7843fc24e92933061",
"tokenDecimal": 6,
"tokenAmount": "10000000"
},
"expiresAt": "2026-11-06T04:30:00Z",
"merchantDisplayName": null,
"qrContent": null
}
}
The order IDs, addresses, transaction hash, and timestamps are example values.
