Skip to main content

Submit Split

API used to perform the split request for the order. To use this feature, related order created with the create order API must contain orderTags, see Create Order V2.

EndPoint#

POST /binancepay/openapi/profitsharing/v1/submit-split

Request Parameters#

AttributesTypeRequiredLimitationDescription
merchantRequestIdstringY1 <= length <= 32The unique identifier from the merchant for this split request.
prepayOrderIdstringYThe unique order id generated by binance when you create the order.
receiverListReceiverListYMaximum size = 100.List of receiver for this split. refer to

ReceiverList#

AttributesTypeRequiredLimitationDescription
accountstringYBinance ID of receiver. Receiver must have been registered with add-receiver API.
amountdecimalYAmount to split for this account
descriptionstringYMaximum length 128 characters. Shall not contain special characters except ',' / '.'Description.
webhookUrlstringN1 <= length <= 256Can only start with http or https.

Sample Request Parameter#

{    "merchantRequestId": "some_unique_id_1234",    "prepayOrderId": 12345,    "receiverList": [        {            "account": "123456",            "amount": 9.99,            "description": "A description.",            "webhookUrl": "www.abc.com"        }    ]}

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
splitOrderNostringYlength = 18Split order ID
merchantRequestIdstringY1 <= size <= 32Merchant's request ID
prepayOrderIdstringYPrepay order ID
statusintYWAITING(0), PROCESSING(1), FINISHED(2)
receiverOrderDetailsList(SplitReceiverOrderDetail)YReceiver split detail, refer to

SplitReceiverOrderDetail#

AttributesTypeRequiredLimitationDescription
accountstringYAccount ID
amountdecimalYAmount to split for this account
failReasonstringNmax length = 128Failed reason
detailIdStringYlength = 18Split detail ID
statusintYPROCESSING(1), SUCCESS(2), FAIL(3)
finishTimelongYUnix timestamp(seconds) when split order detail was processed

Sample Response#

{  "status": "SUCCESS",  "code": "000000",  "data": {    "splitOrderNo": "12345",    "merchantRequestId": "1234567",    "prepayOrderId": "123456789",    "status": 0,    "receiverOrderDetails": [      {        "account" : "12345678",        "amount": 2.5,        "detailId": 1000001,        "status": 2,        "finishTime": 1679044272      }    ]  }}}
{  "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