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"
}