6. Get Agreement Information

POST /{Merchant’s tag}/api/merchant/getAgreementInfo

Sample: https://hk-api.merchant.com/api/merchant/getAgreementInfo

Provide this interface for AlipayHK to get the agreement information, including agreement ID, user account ID, etc.


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.consult

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.

  • AUTH_AGREEMENTPAY : Sign for auto-debit

String

Y

"[\"AUTH_AGREEMENTPAY\"]"

accountId

Account ID in merchant side

To identify the user, keys 「accountId」 & 「merchantTransId」, one of them must have content

String

N

123456

merchantTransId

Bills payment order number of the user in merchant side.

To identify the user, keys 「accountId」 & 「merchantTransId」, one of them must have content

String

N

Order_No_20181212_0000002

extendInfo

Json string for extend

String

N

Example

copy
{
    "accountId": "100869527",
    "authMerchantId": "2160120033123456",
    "authSite": "ALIPAY_HK",
    "authSiteUserId": "2160265081123456",
    "openId": "4eab52ae177c4d2d2bffa41234567",
    "scopes": "[\"AUTH_AGREEMENTPAY\"]"
}

Response

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

respTime

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

result

Result

ResultInfo

Y

"resultInfo": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultCodeId": "00000000",
"resultMsg": ""
}

agreementPayAuthInfo

Agreement information

AgreementPayAuthInfo

Y

"agreementPayAuthInfo": {

"merchantAgreementId": "e8qdwl9casxor13",

"merchantUserId": "accountId"

}

extendInfo

Json string for extend

ExtendInfo

N

"{}"

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

copy
{
    "result": {
        "resultCode": "SUCCESS",
        "resultStatus": "S",
        "resultMessage": "success"
    },
    "agreementPayAuthInfo": {
        "merchantAgreementId": "c647f4cb6bb14db99946a93a12345678",
        "merchantUserId": "100869527"
    }
}