Query Split
API used to query profit sharing orders.
EndPoint
POST /binancepay/openapi/profitsharing/v1/query-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. |
Sample Request Parameter
{
"merchantRequestId": "my_request_1234",
"prepayOrderId": "123456789"
}
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 | Y | max length = 128 | Failed reason (if any) |
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 |