Skip to main content

Query Order

You can use the "Query Order" API to query an order and check the order status in real time.

End Point#
POST   /binancepay/openapi/v2/order/query
Request Example#

For full API specification, please go to API Request Reference.

You can either use “merchantTradeNo” or “prepayId” to search for the specific order. Please input at least one of them.

{  "merchantId": "987321472",  "subMerchantId": "987321472",  "merchantTradeNo": "9825382937292",  "prepayId": "29383937493038367292"}
Response Example#

For full API specification, please go to API Request Reference.

{  "status": "SUCCESS",  "code": "000000",  "data": {    "merchantId": "987321472",    "prepayId": "29383937493038367292",    "transactionId": "23729202729220282",    "merchantTradeNo": "9825382937292",    "tradeType": "APP",    "status": "PAID",    "currency": "USDT",    "totalFee": 10.88,    "productName": "Ice Cream",    "productDetail": "Green Tea ice cream cone",    "transactTime": "1425744000123",    "createTime": "1425744000000"  },  "errorMessage": ""}

You can monitor the payment status using the parameter “status”.

StatusDescription
INITIALThe transaction has been initiated. Return this status after calling “Create Order” API successfully.
PENDINGThe transaction is pending for payment.
PAIDThe transaction has been paid.
CANCELEDThe transaction has been closed by you with the close order API.
ERRORThere is an error occurred during the transaction.
REFUNDINGThe transaction is under a refund process.
REFUNDEDThe transaction is partially refunded.
FULL_REFUNDEDThe transaction is fully refunded.
EXPIREDThe transaction is expired. By default, the QR code will expire after 1 hour.
Status
INITIAL
Description
The transaction has been initiated. Return this status after calling “Create Order” API successfully.
Status
PENDING
Description
The transaction is pending for payment.
Status
PAID
Description
The transaction has been paid.
Status
CANCELED
Description
The transaction has been closed by you with the close order API.
Status
ERROR
Description
There is an error occurred during the transaction.
Status
REFUNDING
Description
The transaction is under a refund process.
Status
REFUNDED
Description
The transaction is partially refunded.
Status
FULL_REFUNDED
Description
The transaction is fully refunded.
Status
EXPIRED
Description
The transaction is expired. By default, the QR code will expire after 1 hour.