Share Account Id
This API is used by merchant/partner to get the user's account ID aka Binance ID.
if the user agrees to share the account id, the result will be sent to merchant/partner via Webhook Notification.
User authorization is required to share the account ID to you, the information will be sent to merchant/partner via Webhook Notification
EndPoint
POST /binancepay/openapi/shareinfo/accountId
Request Parameters
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
subMerchantId | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance. |
requestId | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The unique ID assigned by the merchant to identify a share account id request. |
webhookUrl | string | N | maximum length 256. Can only start with http or https. | The URL for share result notification. If the webhookUrl is passed in the parameter, the webhook url configured on the merchant platform will not take effect, and the currently passed url will be called back first. |
Sample Request Body
{
"requestId": "9109c2bd482ef6bccc819c45af104a78"
}
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 | DataObject | N | - | response body, refer to |
errorMessage | string | N | maximum length 256 |
Child Attribute
DataObject
Attributes | Type | Required | Limitation | Description |
---|---|---|---|---|
merchantId | long | Y | number | merchant Id in binance |
id | string | Y | maximum length 19 | unique id generated by binance |
requestId | string | Y | - | unique id assigned by the merchant to identify a share account id request. |
expireTime | long | Y | - | expire time in milli seconds. default 1 hour |
qrcodeContent | string | Y | maximum length 256 | qr content info |
qrcodeUrl | string | Y | maximum length 256 | qr code img link |
Sample Response
applied success
{
"status": "SUCCESS",
"code": "000000",
"data": {
"merchantId": 352520168,
"id": "219014596974616576",
"requestId": "9109c2bd482ef6bccc819c45af104a78",
"expireTime": 1680675385835,
"qrcodeContent": "https://app.binance.com/qr/xxx",
"qrcodeUrl": "https://public.bnbstatic.com/static/payment/20230405/xxx.jpg"
}
}
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 | |
PAYMENT_INVALID_PARAM | 400702 | Invalid request parameter | |
MERCHANT_ACCESS_FORBIDDEN | 400606 | Account has no accessibility to this function | |
PAYMENT_DIRECT_DEBIT_CONTRACT_CODE_INVALID | 406301 | requestId is invalid or duplicated |