Antom, leading provider of tailored payment solutions

alipay.intl.acquiring.common.payQuery

You can use this interface to query the payment result.
Note:
  • For payments that have result_code equals to system_error, you need to initiate the query processes to obtain the actual transaction status. 
  • For transactions with the status WAIT_BUYER_PAY of WAP payment, wait untill times out (3 minutes by default), and then call the query interface again to obtain the final transaction status.

Request parameters

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.
Refer to: RFC 3339 Section 5.6
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).
The reqMsgId identify an unique system request, it is not used to identity an unique business request.
1234567asdfasdf1123fda
6
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
acquirementId
Unique AlipayHK transaction id.
Note:
This parameter is required when merchantTransId = NULL
string
64
N
The AlipayHK transaction id, identifying the transaction to be queried.
20181210194010800100160960000444145
3
merchantTransId 
Unique merchant transaction id.
Note:
This parameter is requiredwhen acquirementId = NULL
string
64
N
The unique merchant transaction id created by the the merchant. 

The 'acquirementId' would be favored over 'merchantTransId' if both are provided.
YIDAO_20181211_0000003

Request sample

{
    "request":{
        "head":{
            "version":"2.0.0",
            "function":"alipay.intl.acquiring.common.payQuery",
            "clientId":"4Q5XPV504B0A5302",
            "reqTime":"2001-07-04T12:08:56+05:30",
            "reqMsgId":"1234567asdfasdf1123fda",
            "reserve":"{}"
        },
        "body":{
            "merchantId":"2160400000002012",
            "merchantTransId":"YIDAO_20181211_0000003"
        }
    },
    "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.  
Refer to: RFC 3339 Section 5.6
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
reserve
Reserved for future implementation
string
256
N
Key/Value
{}

Body


No
Name
Description
Type
Length
Required
Remarks
Sample
1
resultInfo
Result info
/
Y
{
                "resultCode": "SUCCESS",
                "resultCodeId": "00000000",
                "resultMsg": "Success",
                "resultStatus": "S"
 }
2
payment
The payment information, including transaction status and other information.
Note:
This parameter is required when resultInfo.resultCode = SUCCESS
/
N
{
                "acquirementId": "20181210194010800100160960000444145",
                "merchantTransId": "YIDAO_20181211_0000003",
                "orderAmount": {
                    "currency": "HKD",
                    "value": "10000"
                },
                "payStatus": "WAIT_PAY"
     }

Response sample

{
    "response": {
        "body": {
            "payment": {
                "acquirementId": "20181210194010800100160960000444145",
                "merchantTransId": "YIDAO_20181211_0000003",
                "orderAmount": {
                    "currency": "HKD",
                    "value": "10000"
                },
                "payStatus": "WAIT_PAY"
            },
            "resultInfo": {
                "resultCode": "SUCCESS",
                "resultCodeId": "00000000",
                "resultMsg": "Success",
                "resultStatus": "S"
            }
        },
        "head": {
            "clientId": "4Q5XPV504B0A5302",
            "function": "alipay.intl.acquiring.common.payQuery",
            "reqMsgId": "1234567asdfasdf1123fda",
            "respTime": "2018-12-10T22:42:31-08:00",
            "version": "2.0.0"
        }
    }
}

Business Error code

Functional Logic Result Code
No
ResultCodeId
ResultCode
ResultStatus
Remarks
1
12005004
ORDER_NOT_EXIST
F
Order does not exist
2
12005003
ORDER_STATUS_INVALID
F
Invalid order status