AinePay
EN中文
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

parametertypedescriptionrequiredexample
orderIdsarray<string>Merchant order ID list, 1~20 itemsyes["ORDER_1","ORDER_2"]

Response Fields

Top-level response structure:

fieldtypedescription
successbooleantrue when the request succeeds.
codeintegerBusiness result code. Successful responses return 0.
dataobjectOrder data.
msgstringok on success; error message on failure.

Order data:

parametertypedescriptionrequiredexample
data.ordersarray<object>Order list returned for the requested merchant order IDs.yes[{"orderId":"ORDER_10001"}]
data.orders[].idstringAinePay internal order ID.yes123456
data.orders[].orderIdstringMerchant-side order ID.yesORDER_10001
data.orders[].userIdstringThe user ID assigned by the merchant in the AinePay system.yesU_90001
data.orders[].coinstring(enum)Coin.yesUSDT
data.orders[].chainstring(enum)Blockchain code.yesETH
data.orders[].addressstringPayment address.yes0xabc...
data.orders[].qtystringOrder amount as string.yes100.12
data.orders[].statusstring(enum)Order status: INIT, PENDING, PAID, or EXPIRED.yesPAID
data.orders[].paymentTypestring(enum)Order type: CHECKOUT, API, PAYMENT_LINK represent checkout, inline, and payment link orders respectively.yesAPI
data.orders[].expiredintegerOrder expiration timestamp in milliseconds.yes1760000600000
data.orders[].payExpiredintegerPayment page expiration timestamp in milliseconds.yes1760000300000
data.orders[].createdintegerCreation timestamp in milliseconds.yes1760000000000
data.orders[].updatedintegerLast update timestamp in milliseconds.yes1760000300000

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.