API Reference
Query Orders
Query one or more merchant orders to update and confirm their latest status.
Endpoint
- Method:
GET - Path:
/api/merchant/order - Authentication: Required
Request Parameters
| parameter | type | description | required | example |
|---|---|---|---|---|
| orderIds | array<string> | Merchant order ID list, 1~20 items | yes | ["ORDER_1","ORDER_2"] |
Response Fields
Top-level response structure:
| field | type | description |
|---|---|---|
success | boolean | true when the request succeeds. |
code | integer | Business result code. Successful responses return 0. |
data | object | Order data. |
msg | string | ok on success; error message on failure. |
Order data:
| parameter | type | description | required | example |
|---|---|---|---|---|
data.orders | array<object> | Order list returned for the requested merchant order IDs. | yes | [{"orderId":"ORDER_10001"}] |
data.orders[].id | string | AinePay internal order ID. | yes | 123456 |
data.orders[].orderId | string | Merchant-side order ID. | yes | ORDER_10001 |
data.orders[].userId | string | The user ID assigned by the merchant in the AinePay system. | yes | U_90001 |
data.orders[].coin | string(enum) | Coin. | yes | USDT |
data.orders[].chain | string(enum) | Blockchain code. | yes | ETH |
data.orders[].address | string | Payment address. | yes | 0xabc... |
data.orders[].qty | string | Order amount as string. | yes | 100.12 |
data.orders[].status | string(enum) | Order status: INIT, PENDING, PAID, or EXPIRED. | yes | PAID |
data.orders[].paymentType | string(enum) | Order type: CHECKOUT, API, PAYMENT_LINK represent checkout, inline, and payment link orders respectively. | yes | API |
data.orders[].expired | integer | Order expiration timestamp in milliseconds. | yes | 1760000600000 |
data.orders[].payExpired | integer | Payment page expiration timestamp in milliseconds. | yes | 1760000300000 |
data.orders[].created | integer | Creation timestamp in milliseconds. | yes | 1760000000000 |
data.orders[].updated | integer | Last update timestamp in milliseconds. | yes | 1760000300000 |
Example Response
{
"success": true,
"code": 0,
"data": {
"orders": [
{
"id": 123456,
"orderId": "ORDER_10001",
"userId": "U_90001",
"coin": "USDT",
"chain": "ETH",
"address": "0xabc...",
"qty": "100.12",
"status": "PAID",
"paymentType": "API",
"expired": 1760000600000,
"payExpired": 1760000300000,
"created": 1760000000000,
"updated": 1760000300000
}
]
},
"msg": "ok"
}Notes
- Always use Query Orders to determine the final order status.