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
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
bizType | string | Y | - | "PAY_REFUND" |
bizId | string | Y | maximum length 19 | prepay id ,unique id generated by binance |
bizIdStr | string | Y | - | biz id as string |
bizStatus | string | Y | - | "REFUND_SUCCESS","REFUND_REJECTED" |
data | string | Y | - | JSON string, data details refer to |
Child Attribute
Notification Data
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
merchantTradeNo | string | Y | letter or digit, no other symbol allowed | The order id, Unique identifier for the request |
productType | string | Y | maximum length 16 | product type |
productName | string | Y | maximum length 256 | product name |
tradeType | string | Y | "WEB", "APP", "WAP", "MINI_PROGRAM", "PAYMENT_LINK", "OTHERS" | operate entrance |
totalFee | decimal | Y | limitation refer to Create Order API order amount | order amount |
currency | string | Y | - | order currency |
openUserId | string | N | maximum length 19 | Consumer unique id |
refundInfo | string | N | only merchant got approved by Binance Operation's approval will receive this payerInfo | payer information, refer to |
RefundInfo Data
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
refundRequestId | string | Y | maximum length 64 | The unique ID assigned by the merchant to identify a refund request. |
prepayId | string | Y | maximum length 19 | The unique ID assigned by Binance for the original order to be refunded. |
orderAmount | string | Y | limitation refer to Create Order API order amount | The total amount of prepay order. |
refundedAmount | string | Y | limitation refer to Create Order API order amount | The total refunded amount included this refund request. |
refundAmount | string | Y | limitation refer to Create Order API order amount | The refund amount of this refund request. |
remainingAttempts | int | Y | - | 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. |
payerOpenId | string | Y | maximum length 32 | The payer open id of this refund which is the merchant open id. |
duplicateRequest | string | Y | - | 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
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
returnCode | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry |
returnMessage | string | N | - | return message |
Sample Response
After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.
{"returnCode":"SUCCESS","returnMessage":null}