Skip to main content

Binance Pay: Refund Order Notification

Webhook Endpoints#

Binance Pay will send refund order events with final status only when partner use refund open api to partner for notification.

  • Successful close result for the close refund order request will be notified through this webhook bizStatus is "REFUND_SUCCESS" or "REFUND_REJECTED"

Request Parameters#

AttributesTypeRequiredLimitationDescription
bizTypestringY-"PAY_REFUND"
bizIdstringYmaximum length 19prepay id ,unique id generated by binance
bizIdStrstringY-biz id as string
bizStatusstringY-"REFUND_SUCCESS","REFUND_REJECTED"
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
totalFeedecimalYlimitation refer to Create Order API order amountorder amount
currencystringY-order currency
openUserIdstringNmaximum length 19Consumer unique id
refundInfostringNonly merchant got approved by Binance Operation's approval will receive this payerInfopayer information, refer to

RefundInfo Data#

AttributesTypeRequiredLimitationDescription
refundRequestIdstringYmaximum length 64The unique ID assigned by the merchant to identify a refund request.
prepayIdstringYmaximum length 19The unique ID assigned by Binance for the original order to be refunded.
orderAmountstringYlimitation refer to Create Order API order amountThe total amount of prepay order.
refundedAmountstringYlimitation refer to Create Order API order amountThe total refunded amount included this refund request.
refundAmountstringYlimitation refer to Create Order API order amountThe refund amount of this refund request.
remainingAttemptsintY-The remaining attempts of this original order. If this value becomes 1, then your next refund request amount will be ignored. We will refund all the remaing amount of this original order.
payerOpenIdstringYmaximum length 32The payer open id of this refund which is the merchant open id.
duplicateRequeststringY-The flag to mark this request refundRequestId is duplicate or not. It will be 'Y' or 'N'

Sample Payload#

{  "bizType": "PAY_REFUND",  "data": "{\"merchantTradeNo\":\"6177e6ae81ce6f001b4a6233\",\"totalFee\":0.01,\"transactTime\":1635248421335,\"refundInfo\":{\"orderAmount\":\"0.01000000\",\"duplicateRequest\":\"N\",\"payerOpenId\":\"9aa0a8bb21cf5fbf049aad7db35dc3d3\",\"prepayId\":\"123289163323899904\",\"refundRequestId\":\"68711039982968853\",\"refundedAmount\":\"0.01000000\",\"remainingAttempts\":9,\"refundAmount\":\"0.01000000\"},\"currency\":\"USDT\",\"commission\":0,\"openUserId\":\"b5ec36baaa5ab9a5cfb1c29c2057bd81\",\"productType\":\"LIVE_STREAM\",\"productName\":\"LIVE_STREAM\",\"tradeType\":\"APP\"}",  "bizIdStr": "123289163323899904",  "bizId": 123289163323899904,  "bizStatus": "REFUND_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}