跳到主要内容

Split Return

API used to return splited assets

EndPoint

POST /binancepay/openapi/profitsharing/v1/return

Request Parameters

AttributesTypeRequiredLimitationDescription
prepayOrderIdstringYit's Pre Pay order ID
splitOrderNostringNmust pass splitOrderNo or originMerchantRequestId to usThe unique ID that is assigned by Binance Pay to identify a profit-sharing request from merchants or service providers
originMerchantRequestIdstringNmust pass splitOrderNo or originMerchantRequestId to usThe unique ID that is assigned by the merchant/SP to identify a profit-sharing request.
merchantReturnNostringY1 <= length <= 32The unique ID that is assigned by the merchant/SP to identify a profit-return request.
transferOutAccountstringYPay ID, the one that the merchant wants to collect fund back
returnAmountdecimalYthe amount that want to collect back
descriptionstringN1 <= length <= 128
webhookUrlstringN1 <= length <= 256Can only start with http or https.

Sample Request Parameter

{
"prepayOrderId": "215324856789557248",
"splitOrderNo": "224313347535298560",
"originMerchantRequestId": "521134231",
"merchantReturnNo": "520cczhong9",
"transferOutAccount": "1000135827517",
"returnAmount": "0.01",
"description": "jojo",
"webhookUrl": "http://www.aaa.com/settle/query-merchant-info"
}

Response Parameters

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

Child Attribute

Response

AttributesTypeRequiredLimitationDescription
prepayOrderIdstringY
splitOrderNostringY
originMerchantRequestIdstringY
merchantReturnNostringY
transferOutAccountstringY
returnAmountdecimalY
returnOrderNostringYBinance return order no
statusintYPROCESSING(1),SUCCESS(2),FAIL(3);
failReasonstringN
finishTimelongYunix_timestamp (seconds)

Sample Response

{
"status": "SUCCESS",
"code": "000000",
"data": {
"prepayOrderId": "233178711799922688",
"splitOrderNo": "233178716105637888",
"originMerchantRequestId": "IecscqYJMLtPoazKFeHfQNVDmyUeverE",
"merchantReturnNo": "520cczhong100",
"transferOutAccount": "1000136964356",
"returnAmount": 0.01,
"returnOrderNo": "233343189633785856",
"status": 2,
"failReason": "",
"finishTime": 1686495703
}
}
}
{
"status": "FAIL",
"code": "400209",
"errorMessage": "order not found or order status is not success"
}

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
PAYMENT_ACCOUNT_NOT_FOUND400601Account not found
ORDER_STATUS_INVALID400209Order not found or order status is not success
NO_PROFIT_SHARE_MARK400210Order can not split revenue
PROFIT_SPLIT_AMOUNT_INVALID400211Split amount larger than the max rate
ORDER_STATUS_NOT_END400212Exists frozen amount, can not split
SAME_ACCOUNT400213Same account repeated
RECEIVER_INVALID400214Receiver not bind
NO_AVAILABLE_SPLIT_AMOUNT400215No available split amount
REQ_ID_ALREADY_EXISTS400216RequestId has been submitted
SPLITTING_ORDER_EXIST400217Has order that is splitting
RECEIVER_NOT_SPLIT400218Hasn't split for this receiver
RETURN_SPLIT_REST_ZERO_AMOUNT400219All amount has returned
LARGER_THAN_MAX_TIMES400220Larger than max return times 10
LARGER_THAN_MAX_INTERVAL400221Larger than max interval 180 days
SPLIT_NOT_SUCCESS400222Split has not been success for this account
INVALID_VOUCHER_STATUS400223Invalid voucher status