Skip to main content

Binance Pay: Order Notification

Webhook Endpoints#

Binance Pay will send order events with final status to partner for notification. You will be able to configure webhook endpoints via the Binance Merchant Admin Portal. Result of the orders that are close will be notified to you through this webhook with bizStatus = "PAY_CLOSED".

In situation where event was failed to send, the webhook will retry up to 6 times to resend the event.

Request Parameters#

AttributesTypeRequiredLimitationDescription
bizTypestringY-"PAY"
bizIdlongY-Prepay order id
bizStatusstringY-"PAY_SUCCESS"",PAY_CLOSED"
datastringY-JSON string, data details refer to

Child Attribute#

Notification Data#

AttributesTypeRequiredLimitationDescription
merchantTradeNostringYletter or digit, no other symbol allowedThe order id, Unique identifier for the request
productTypestringYmaximum length 16product type
productNamestringYmaximum length 256product name
tradeTypestringY"WEB", "APP", "WAP", "MINI_PROGRAM", "PAYMENT_LINK", "OTHERS"operate entrance
totalFeedecimalY-order amount
currencystringY-order currency
openUserIdstringN-payer unique id
passThroughInfostringN-pass through info, from the create order api

Sample Payload#

{  "bizType": "PAY",  "data": "{\"merchantTradeNo\":\"9825382937292\",\"totalFee\":0.88000000,\"transactTime\":1619508939664,\"currency\":\"BUSD\",\"openUserId\":\"1211HS10K81f4273ac031\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"tradeType\":\"WEB\",\"transactionId\":\"M_R_282737362839373\"}",  "bizId": 29383937493038367292,  "bizStatus": "PAY_SUCCESS"}

Response Parameters#

AttributesTypeRequiredLimitationDescription
returnCodestringY"SUCCESS" or "FAIL"result code of notification processing, if process fail, Binance Pay will retry
returnMessagestringN-return message

Sample Response#

After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.

{"returnCode":"SUCCESS","returnMessage":null}