9. Account Binding
Request
Request header
Name | Type | Required | Max Length | Description | Sample |
version | String | M | 8 | API version | 1.0.0 |
function | String | M | 128 | API Interface | alipay.intl.merchant.account.bind |
clientId | String | M | 8 | Client ID | 2110200000000044 |
reqTime | String | M | Request time | 2001-07-04T12:08:56+05:30 | |
reqMsgId | String | M | 64 | Request message ID | fj398457jd8iue98d8w7w93j |
reserve | String | O | 256 | Reserved for future implementation | {} |
Request body
Name | Type | Max Length | Required | Description | Sample |
merchantAccountId | String | 64 | M | merchantId | 2160400000002012 |
subMerchantId | String | 64 | O | subMerchantId for merchant's sub-brand | 2160400000002012 |
type | String | 16 | M | bill type | TELECOM |
subType | String | 16 | M | bill sub-type | MOBILE_SERVICE |
source | String | 16 | M | bill source |
|
accountInfo | String | JSON | C | For the source is 'BY_TEMPLATE' scenario: accountInfo for binding by template | { "formCode":"", "formValue": { "fieldCode1":"fieldValue1", "fieldCode2":"fieldValue2", "fieldCode3":"fieldValue3" } } |
accountId | String | 64 | C | no value when source=BY_TEMPLATE | 88781108
|
openId | String | 64 | M | ID of AlipayHK user.
| |
userId | String | 64 | M | ID of AlipayHK user.
| 2160xxxxx |
timestamp | String | M | timestamp | ||
extendInfo | String | O | Json string for extend |
Sample
{
"accountId": "92161234",
"merchantId": "20880316312345",
"openId": "692345124065fb70986efea85c123456",
"subMerchantId": "4555212345",
"subType": "MOBILE_SERVICE",
"timestamp": "1780849297416",
"type": "TELECOM",
"userId": "216000000001"
}Response
Response header
Name | Type | Required | Max Length | Description | Sample |
version | String | M | 8 | API version | 1.0.0 |
function | String | M | 128 | API Interface | alipay.intl.merchant.account.bind |
clientId | String | M | 8 | Client ID | 2110200000000044 |
respTime | String | M | Request time | 2001-07-04T12:08:56+05:30 | |
reqMsgId | String | M | 64 | Request message ID | fj398457jd8iue98d8w7w93j |
reserve | String | O | 256 | Reserved for future implementation | {} |
Response body
Name | Type | Max Length | Required | Description | Sample |
result | Result | / | M | { "resultStatus": "S", "resultCode": "0000", "resultMsg": "" } | |
needBind | String | 16 | M | true/false | |
accountInfo | String | / | M | { "accountId": "88701108", "type": "TELECOM", "subType": "MOBILE_SERVICE", "status": "VALID", "autoDebitStatus": "UN_AUTO_DEBIT", "merchant": { "subMerchantId": "4555219051", "merchantAccountId": "2088031633039071", "merchantEnglishName": "China Mobile", "merchantName": "中國移動" }, "name": "用户昵称", "phone": "用户联系手机号" } |
Sample
{
"result": {
"resultStatus": "S",
"resultCode": "0000",
"resultCodeId": "0000",
"resultMessage": "SUCCESS"
},
"needBind": "true",
"accountInfo": {
"accountId": "12345678",
"type": "TELECOM",
"subType": "MOBILE_SERVICE",
"status": "VALID",
"autoDebitStatus": "UN_AUTO_DEBIT",
"merchant": {
"merchantId": "2088003004005000",
"subMerchantId": "2003004005006000",
"merchantName": "示例移动",
"merchantEnglishName": "Example Mobile"
}
}
}Result
Name | Type | Description | Sample |
resultCode | result code | String | SUCCESS |
resultStatus | result status | String | S- Success F - Fail |
resultMessage | result description | String | SUCCESS |