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
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
merchantRequestId | string | Y | 1 <= length <= 32 | The unique identifier from the merchant for this split request. |
prepayOrderId | string | Y | The unique order id generated by binance when you create the order. | |
receiverList | ReceiverList | Y | Maximum size = 100. | List of receiver for this split. refer to |
ReceiverList
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
account | string | Y | Binance ID of receiver. Receiver must have been registered with add-receiver API. | |
amount | decimal | Y | Amount to split for this account | |
description | string | Y | Maximum length 128 characters. Shall not contain special characters except ',' / '.' | Description. |
webhookUrl | string | N | 1 <= length <= 256 | Can 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
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 | Response | N | - | response body, refer to |
errorMessage | string | N | maximum length 256 |
Child Attribute
Response
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
splitOrderNo | string | Y | length = 18 | Split order ID |
merchantRequestId | string | Y | 1 <= size <= 32 | Merchant's request ID |
prepayOrderId | string | Y | Prepay order ID | |
status | int | Y | WAITING(0), PROCESSING(1), FINISHED(2) | |
receiverOrderDetails | List(SplitReceiverOrderDetail) | Y | Receiver split detail, refer to |
SplitReceiverOrderDetail
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
account | string | Y | Account ID | |
amount | decimal | Y | Amount to split for this account | |
failReason | string | N | max length = 128 | Failed reason |
detailId | String | Y | length = 18 | Split detail ID |
status | int | Y | PROCESSING(1), SUCCESS(2), FAIL(3) | |
finishTime | long | Y | Unix 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
Name | Code | Reason | Solution |
---|---|---|---|
UNKNOWN_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later |
INVALID_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. |
INVALID_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. |
INVALID_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock |
INVALID_API_KEY_OR_IP | 400004 | API identity key not found or invalid. | Check API identity key |
BAD_API_KEY_FMT | 400005 | API identity key format invalid. | Check API identity key. |
BAD_HTTP_METHOD | 400006 | Request method not supported. | Check Request method. |
MEDIA_TYPE_NOT_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. |
INVALID_REQUEST_BODY | 400008 | Request body is not a valid json object. | Check Request body |
MANDATORY_PARAM_EMPTY_OR_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | |
INVALID_PARAM_WRONG_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | |
INVALID_PARAM_WRONG_VALUE | 400102 | A parameter was not valid, the value is out of range. | |
INVALID_PARAM_ILLEGAL_CHAR | 400103 | A parameter was not valid, contains illegal characters | |
INVALID_REQUEST_TOO_LARGE | 400104 | Invalid request, content length too large | |
PAYMENT_ACCOUNT_NOT_FOUND | 400601 | Account not found | |
ORDER_STATUS_INVALID | 400209 | Order not found or order status is not success | |
NO_PROFIT_SHARE_MARK | 400210 | Order can not split revenue | |
PROFIT_SPLIT_AMOUNT_INVALID | 400211 | Split amount larger than the max rate | |
ORDER_STATUS_NOT_END | 400212 | Exists frozen amount, can not split | |
SAME_ACCOUNT | 400213 | Same account repeated | |
RECEIVER_INVALID | 400214 | Receiver not bind | |
NO_AVAILABLE_SPLIT_AMOUNT | 400215 | No available split amount | |
REQ_ID_ALREADY_EXISTS | 400216 | RequestId has been submitted | |
SPLITTING_ORDER_EXIST | 400217 | Has order that is splitting | |
RECEIVER_NOT_SPLIT | 400218 | Hasn't split for this receiver | |
RETURN_SPLIT_REST_ZERO_AMOUNT | 400219 | All amount has returned | |
LARGER_THAN_MAX_TIMES | 400220 | Larger than max return times 10 | |
LARGER_THAN_MAX_INTERVAL | 400221 | Larger than max interval 180 days | |
SPLIT_NOT_SUCCESS | 400222 | Split has not been success for this account | |
INVALID_VOUCHER_STATUS | 400223 | Invalid voucher status |