Refund Order
Refund order API used for Merchant/Partner to refund for a successful payment.
EndPoint
POST /binancepay/openapi/order/refund
Request Parameters
| Attributes | Type | Required | Limitation | Description |
|---|---|---|---|---|
| refundRequestId | string | Y | maximum length 64 | The unique ID assigned by the merchant to identify a refund request.The value must be same for one refund request. |
| prepayId | string | Y | maximum length 19 | The unique ID assigned by Binance for the original order to be refunded. |
| refundAmount | decimal | Y | limitation refer to Create Order API order amount | You can perform multiple partial refunds, but their sum should not exceed the order amount. |
| refundReason | string | N | maximum length 256 | |
| webhookUrl | string | N | maximum length 256. Can only start with http or https. | The URL for refund order notification. If the webhookUrl is passed in the parameter, the webhook url configured on the merchant platform will not take effect, and the currently passed url will be called back first. |
Sample Request Body
{
"refundRequestId": "68711039982968832",
"prepayId": "383729303729303",
"refundAmount": 25.17,
"refundReason": ""
}
Response Parameters
| Attributes | Type | Required | Limitation | Description |
|---|---|---|---|---|
| status | string | Y | "SUCCESS" or "FAIL" | status of the API request |
| code | string | Y | - | request result code, refer to |
| data | RefundResult | N | - | response body, refer to |
| errorMessage | string | N | maximum length 256 |
Child Attribute
RefundResult
| Attributes | Type | Required | Limitation | Description |
|---|---|---|---|---|
| refundId | long | Y | - | The unique ID assigned by Binance for this refund. |
| 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. |
| refundedCommission | string | Y | - | The total refunded transaction fees included this refund request. |
| refundCommission | string | Y | - | The refund transaction fees 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. |
| refundStatus | string | Y | - | The status of this refund. Example: INITIAL, PENDING, CANCELLED, REFUNDED |
| duplicateRequest | string | Y | - | The flag to mark this request refundRequestId is duplicate or not. It will be 'Y' or 'N' |
Response Parameters
{
"status": "SUCCESS",
"code": "000000",
"data": {
"refundId": 419936748741509122,
"refundRequestId": "68711039982968832",
"prepayId": "383729303729303",
"orderAmount": "100.11",
"refundedAmount": "10.88",
"refundAmount": "5.00",
"refundedCommission": "0.00001000",
"refundCommission": "0.00001000",
"remainingAttempts": 8,
"payerOpenId": "dde730c2e0ea1f1780cf26343b98fd3b",
"refundStatus": "REFUNDED",
"duplicateRequest": "N"
},
"errorMessage": ""
}