Respond to payment inquiry
Alipay+ calls the inquiryPayment API to retrieve the final status of a transaction if that status was not received in the initial pay API response or through a notifyPayment notification. This guide explains how to correctly implement your response to ensure the transaction status is synchronized.
The following figure shows the payment result inquiry flow of a transaction.

The process of notifying the payment result consists of the following steps:
- The Ant server calls the inquiryPayment API to inquire about the payment status from the MPP server when the payment status is not final.
- The MPP server returns the payment status to the Ant server.
Processing logic
When responding to the inquiryPayment request from Alipay+, you must return the result of the API call (result) and the result of the payment (paymentResult) as follows:
Scenario | result.resultStatus | result.resultCode | paymentResult.resultStatus |
Payment successful |
|
|
|
Payment failed |
|
|
|
Payment is processing |
|
|
|
Payment order does not exist |
|
| N/A |
System or network issue |
|
| N/A |
If no response from you is received, Alipay+ retries the inquiry request at increasing intervals until a final payment status (S or F) is received. The intervals are 4 sec, 4 sec, 30 sec, 60 sec, 60 sec, 60 sec, 5 min, and 5 min.
For more information about how to define your result codes, see Result codes.
Sample
The following sample shows the request and response of the inquiryPayment API.
Request from Alipay+ to the MPP
Alipay+ sends the payment inquiry request.
{
"acquirerId": "1022188000000000001",
"pspId":"1022172000000000001",
"paymentRequestId":"20200101234567890132"
}Response from the MPP to Alipay+
The MPP returns a response that indicates a successful payment result.
{
"result": {
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"success"
},
"paymentResult": {
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"success"
},
"paymentId":"20200101234567890133333",
"paymentTime": "2020-01-01T12:01:01+08:30",
"paymentAmount":{
"value":"100",
"currency":"JPY"
},
"payToAmount":{
"value":"1000",
"currency":"KRW"
},
"customerId":"1234567"
}