Query Settlement Status#
Query settlement status by on-chain transaction hash. Applicable to exact (syncSettle=false) asynchronous polling scenarios and status tracking after aggr_deferred compressed on-chain submission.
Request URL: GET /api/v6/pay/x402/settle/status
Request Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| txHash | String | Yes | On-chain transaction hash (Query parameter) |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| success | Boolean | Whether the query succeeded (false when txHash does not exist) |
| errorReason | String | Machine-readable failure reason (returned on failure) |
| errorMessage | String | Human-readable failure description (returned on failure) |
| payer | String | Payer wallet address |
| transaction | String | On-chain transaction hash |
| network | String | CAIP-2 chain identifier |
| status | String | Current settlement status |
status Values#
| status | Meaning |
|---|---|
pending | Processing, not yet finalized |
success | On-chain transaction succeeded |
failed | On-chain transaction failed |
Request Example#
Bash
curl --location --request GET 'https://web3.okx.com/api/v6/pay/x402/settle/status?txHash=0x4f46ed8eac92ddbccfb56a88ff827db3616c7beb191adabbeeded901340bd7d5' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
Response Example -- Query Succeeded#
Json
{
"code": "0",
"msg": "success",
"data": {
"success": true,
"errorReason": null,
"errorMessage": null,
"payer": "0xcb30ed083ad246b126a3aa1f414b44346e83e67d",
"transaction": "0x4f46ed8eac92ddbccfb56a88ff827db3616c7beb191adabbeeded901340bd7d5",
"network": "eip155:196",
"status": "success"
}
}
Response Example -- Transaction Not Found#
Json
{
"code": "0",
"msg": "success",
"data": {
"success": false,
"errorReason": "not_found",
"errorMessage": "Transaction not found for txHash: 0xabc123...",
"payer": null,
"transaction": null,
"network": null,
"status": null
}
}