Skip to main content

Query Refund

Refund order API used for Merchant/Partner to refund for a successful payment.

EndPoint

POST /binancepay/openapi/order/refund/query

Request Parameters

AttributesTypeRequiredLimitationDescription
refundRequestIdstringYmaximum length 64The unique ID assigned by the merchant to identify a refund request.

Sample Request Body

{
"refundRequestId": "68711039982968832"
}

Response Parameters

AttributesTypeRequiredLimitationDescription
statusstringY"SUCCESS" or "FAIL"status of the API request
codestringY-request result code, refer to
dataRefundResultN-response body, refer to
errorMessagestringNmaximum length 256

Child Attribute

RefundResult

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.
refundStatusstringY-The status of this refund. Example: REFUND_SUCCESS,REFUND_FAIL,REFUND_PENDING

Response Parameters

{
"status": "SUCCESS",
"code": "000000",
"data": {
"refundRequestId": "68711039982968832",
"prepayId": "383729303729303",
"orderAmount": "100.11",
"refundedAmount": "10.88",
"refundAmount": "5.00",
"remainingAttempts":8,
"payerOpenId":"dde730c2e0ea1f1780cf26343b98fd3b",
"refundStatus":"REFUND_SUCCESS"
},
"errorMessage": ""
}

Result Code

NameCodeReasonSolution
UNKNOWN_ERROR400000An unknown error occurred while processing the request.Try again later
INVALID_REQUEST400001Parameter format is wrong or parameter transferring doesn't follow the rules.Please check whether the parameters are correct.
INVALID_SIGNATURE400002Incorrect signature resultCheck whether the signature parameter and method comply with signature algorithm requirements.
INVALID_TIMESTAMP400003Timestamp for this request is outside of the time window.Sync server clock
INVALID_API_KEY_OR_IP400004API identity key not found or invalid.Check API identity key
BAD_API_KEY_FMT400005API identity key format invalid.Check API identity key.
BAD_HTTP_METHOD400006Request method not supported.Check Request method.
MEDIA_TYPE_NOT_SUPPORTED400007Media type not supported.Check Request Media type.
INVALID_REQUEST_BODY400008Request body is not a valid json object.Check Request body
MANDATORY_PARAM_EMPTY_OR_MALFORMED400100A parameter was missing/empty/null, or malformed.
INVALID_PARAM_WRONG_LENGTH400101A parameter was not valid, was empty/null, or too long/short, or wrong format.
INVALID_PARAM_WRONG_VALUE400102A parameter was not valid, the value is out of range.
INVALID_PARAM_ILLEGAL_CHAR400103A parameter was not valid, contains illegal characters
INVALID_REQUEST_TOO_LARGE400104Invalid request, content length too large
REFUND_REQUEST_ID_NOT_FOUND400304refund request id not found