7. Sign Agreement
POST /{Merchant’s tag}/api/merchant/signContract
Sample: https://hk-api.merchant.com/api/merchant/signContract
Provide this interface for AlipayHK to unbind an account in your system.
Request
Header
Name | Description | Type | Required | Max Length | Sample |
version | API version | String | Y | 8 | 1.0.0 |
function | API Interface | String | Y | 128 | alipay.intl.oauth.auth.sign.apply |
clientId | Client ID | String | Y | 8 | 2110200000000044 |
reqTime | Request time | String | Y | 2001-07-04T12:08:56+05:30 | |
reqMsgId | Request message ID | String | Y | 64 | UUID for every request |
reserve | Reserved for future implementation | String | N | 256 | {} |
Body
Name | Description | Type | Required | Sample |
authMerchantId | Auth merchant ID. | String | Y | 2160400000002012 |
authSiteUserId | ID of AlipayHK user.
| String | Y | 2160120037098191 |
openId | ID of AlipayHK user.
| String | Y | |
authSite | Site name | String | Y | ALIPAY_HK |
scopes | Sign scope. Json String.
| String | Y | "[\"AUTH_AGREEMENTPAY\"]" |
merchantAgreementId | Contract id from merchant sign | String | Y | 2ebb02a61b7a425dad989612fbc20334 |
authCode | The merchant needs to keep the authCode from AlipayHK and call AlipayHK's applyToken API to complete the final authorization. | String | Y | |
extendInfo | Json string for extend | String | N |
Example
{
"authCode": "28100413BXNEvabcdefg2VyTHa449",
"authMerchantId": "2160000000000001",
"authSite": "ALIPAY_HK",
"authSiteUserId": "2160220077000001",
"merchantAgreementId": "5366166b411d4abcde0eab6e1ccd62f6",
"scopes": "[\"AUTH_AGREEMENTPAY\"]"
}Response
Header
Name | Description | Type | Required | Max Length | Sample |
version | API version | String | M | 8 | 1.0.0 |
function | API Interface | String | M | 128 | alipay.intl.oauth.auth.sign.apply |
clientId | Client ID | String | M | 8 | 2110200000000044 |
respTime | Request time | String | M | 2001-07-04T12:08:56+05:30 | |
reqMsgId | Request message ID | String | M | 64 | UUID for every request |
reserve | Reserved for future implementation | String | O | 256 | {} |
Body
Name | Description | Type | Required | Sample |
result | 结果 | Object | M | "resultInfo": { |
ResultInfo
Name | Description | Type | Sample |
resultCode | result code | String | SUCCESS |
resultCodeId | String | 00000000 | |
resultStatus | result status | String | S- Success F - Fail |
resultMessage | result description | String | SUCCESS |
Example
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
}
}