Query Order
You can use the "Query Order" API to query an order and check the order status in real time.
#
End PointPOST /binancepay/openapi/v2/order/query
#
Request ExampleFor 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 ExampleFor 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”.
Status | Description |
---|---|
INITIAL | The transaction has been initiated. Return this status after calling “Create Order” API successfully. |
PENDING | The transaction is pending for payment. |
PAID | The transaction has been paid. |
CANCELED | The transaction has been closed by you with the close order API. |
ERROR | There is an error occurred during the transaction. |
REFUNDING | The transaction is under a refund process. |
REFUNDED | The transaction is partially refunded. |
FULL_REFUNDED | The transaction is fully refunded. |
EXPIRED | The 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.