alipay.intl.acquiring.agreement.pay
This interface is used by merchant to make an automatic deduction from the binded account, by using the correct accessToken.
Request parameters
Header
No | Name | Description | Type | Length | Required | Remarks | Sample |
1 | version | API version | string | 8 | Y | As per the respective API reference | 2.0.0 |
2 | function | API interface | string | 128 | Y | According to specifications defined by each business domain | alipay.intl.function |
3 | clientId | Client ID | string | 32 | Y | Provided by AlipayHK, used to identify partner and application system | 4Q5XPV504B0A5302 |
4 | reqTime | Request time | datetime | / | Y | DateTime with timezone, which follows the ISO-8601 standard.  | 2001-07-04T12:08:56+05:30 |
5 | reqMsgId | Request message ID | string | 64 | Y | Each request will be assigned with a unique id (uuid). | 1234567asdfasdf1123fda |
6 | accessToken | Access token | string | 64 | Y | M9WkKnmRGFflrgEp2ORH5sMIkH9L59AXK6SFkdzAi5000969 | |
7 | reserve | Reserved for future implementation | string | 256 | N | Key/Value | {} |
Body
No | Name | Description | Type | Length | Required | Remarks | Sample |
1 | merchantId | The merchant id, which identifies the settlement target that AlipayHK would settle to. | string | 64 | Y | 2160400000002012 | |
2 | productCode | The product code. | enum<productcode> | 64 | Y | AUTO_DEBIT | |
3 | merchantTransId | Unique merchant transaction id. | string | 64 | Y | YIDAO_20181212_0000002 | |
4 | order | The order information. | / | Y | The orderAmount should be provided in the smallest common currency unit.For example, to create a charge for $1.00, you would set orderAmount.value=100 (100 cents). | "order": { | |
5 | settleContractId | The settlement contract id. | string | 64 | N | USD-1 | |
7 | extendInfo | Reserved for extended info | string | 2048 | N | Key/Value | Â "extendInfo": "{}" |
8 | notify_url | Notify url for a completed payment | string | 512 | N | https://www.merchant.com/payNotify.html |
Request sample
{
   "request":{
     "head":{
       "version":"2.0.0",
       "function":"alipay.intl.acquiring.agreement.pay",
       "clientId":"4Q5XPV504B0A5302",
       "reqTime":"2001-07-04T12:08:56+05:30",
       "reqMsgId":"YIDAO_GW_20181212_000002",
       "accessToken":"M9WkKnmRGFflrgEp2ORH5sMIkH9L59AXK6SFkdzAi5000969",
       "reserve":"{}"
     },
     "body": {
       "settleContractId": "USD-1",
       "productCode": "AGREEMENT_OR_CASHIER_PAY",
       "merchantId": "2160400000002012",
       "merchantTransId": "YIDAO_20181212_0000002",
       "extendInfo": "{}",
       "notify_url": "https://7yfnppybv0.execute-api.ap-northeast-1.amazonaws.com/sandbox/notify/2160400000002012",
       "order": {
         "orderAmount": {
           "currency": "HKD",
           "value": "10000"
         },
         "orderDetail": "phone  bill",
         "orderTitle": "merchant xxx"
       }
     }
   },
   "signature":"testing_signature"
}
Response Parameters
Header
No | Name | Description | Type | Length | Required | Remarks | Sample |
1 | version | API version | string | 8 | Y | As per the respective API reference | 2.0.0 |
2 | function | API interface | string | 128 | Y | According to specifications defined by each business domain | alipay.intl.function |
3 | clientId | Client ID | string | 32 | Y | Provided by Alipay, used to identify partner and application system | 4Q5XPV504B0A5302 |
4 | respTime | Response time | datetime | / | Y | DateTime with timezone, which follows the ISO-8601 standard.  | 2001-07-04T12:08:56+05:30 |
5 | reqMsgId | Request message ID | string | 64 | Y | Each request will be assigned with a unique id (uuid). | 1234567asdfasdf1123fda |
6 | accessToken | Access token | string | 64 | Y | M9WkKnmRGFflrgEp2ORH5sMIkH9L59AXK6SFkdzAi5000969 | |
7 | reserve | Reserved for future implementation | string | 256 | N | Key/Value | {} |
BodyÂ
No | Name | Description | Type | Length | Required | Remarks | Sample |
1 | resultInfo | Result info | / | Y | {Â | ||
2 | acquirementId | Unique AlipayHK transaction id. Note: This parameter is required when resultInfo.resultCode = SUCCESS | string | 64 | N | 20181211194010800100160960000444183 | |
3 | merchantTransId | Unique merchant transaction id. Note: This parameter is required when resultInfo.resultCode = SUCCESS | string | 64 | N | YIDAO_20181212_0000002 | |
4 | orderAmount | Order amount Note: This parameter is required when resultInfo.resultCode = SUCCESS | / | N | Should be exactly same as 'orderAmount'Â Â Â | { "currency": "HKD", } | |
5 | createTime | The creation time of the transaction Note: This parameter is required when resultInfo.resultCode = SUCCESS | datetime | / | N | DateTime with timezone, which follows the ISO-8601 standard.  | 2001-07-04T12:08:56+05:30 |
6 | extendInfo | Reserved for extended info | string | 2048 | N | {} |
Response sampleÂ
{
   "response": {
     "body": {
       "acquirementId": "20181211194010800100160960000444183",
       "createTime": "2018-12-11T20:15:31-08:00",
       "merchantTransId": "YIDAO_20181212_0000002",
       "orderAmount": {
         "currency": "HKD",
         "value": "10000"
       },
       "resultInfo": {
         "resultCode": "SUCCESS",
         "resultCodeId": "00000000",
         "resultMsg": "Success",
         "resultStatus": "S"
       }
     },
     "head": {
       "clientId": "4Q5XPV504B0A5302",
       "function": "alipay.intl.acquiring.agreement.pay",
       "reqMsgId": "YIDAO_GW_20181212_000002",
       "respTime": "2018-12-11T20:15:33-08:00",
       "version": "2.0.0"
     }
   }
}
Â
Business Error code
Functional Logic Result Code
No | ResultCodeId | ResultCode | ResultStatus | Remarks |
1 | 00000019 | PROCESS_FAIL | F | General business failure |
2 | 12005123 | AUTH_NOT_SUCCESS | F | The authorization is not success |
3 | 12007001 | RISK_AML_REJECT | F | Anti money laundering risk reject |
4 | 12007615 | PRODUCT_CODE_INVALID | F | Product code invalid |
5 | 00000004 | PARAM_ILLEGAL | F | Illegal parameters |
6 | 12002006 | USER_STATUS_ABNORMAL | F | User status is not normal |
7 | 00000901 | UNKNOWN_EXCEPTION | U | Unknown exception |
8 | 00000011 | RISK_REJECT | F | Risk reject |
9 | 12002005 | USER_NOT_EXIST | F | User does not exist |
10 | 12002006 | USER_STATUS_ABNORMAL | F | User status is not normal |
11 | 12002027 | OTP_VERIFY_TIMES_EXCEED_LIMIT | F | Verify code failed too many times, user must get a new code. |
12 | 12002026 | OTP_VERIFY_UNMATCHED | F | Verify code invalid |
13 | 12014174 | AUTH_CODE_INVALID | F | authCode is invalid |
14 | 12014155 | UNKNOWN_CLIENT | F | Unknown client |
15 | 00000025 | REPEAT_REQ_INCONSISTENT | F | Repeated submit, and requests are inconsistent. |
16 | 12005012 | USER_CONTRACT_STATUS_INVALID | F | Status of user contract is invalid |
17 | 12005001 | CURRENCY_NOT_SUPPORT | F | Transaction currency is invalid |
18 | 12005004 | ORDER_NOT_EXIST | F | Order does not exist |
19 | 12005104 | AMOUNT_EXCEED_LIMIT | F | Amount exceeds limits |
20 | 12005131 | IDENTITY_CODE_INVALID | F | The identity code is invalid |
21 | 12005132 | IDENTITY_CODE_NOT_SUPPORT | F | The format of identity code is NOT supported, e.g. the identity code is from a unsupported wallet. |
22 | 12005124 | PAYMENT_IN_PROCESS | U | The payment is still under process |
23 | 12005002 | ORDER_IS_CLOSED | F | Order status is closed |
24 | 12005003 | ORDER_STATUS_INVALID | F | Order status is invalid |
25 | 12006004 | BALANCE_NOT_ENOUGH | F | Balance not enough |
26 | 12002046 | USER_AMOUNT_EXCEED_LIMIT | F | User amount exceeds limits |
27 | 12002010 | USER_NO_PAYMENT_INSTRUMENT | F | This user has no payment instrument |