Notify payment result
It is recommended to notify Alipay+ when a payment reaches a final status of success or failure. This guide explains how to use the notifyPayment API to send this notification.
The following figure shows the payment result notification flow of a transaction.

The process of notifying the payment result consists of the following steps:
- When the payment reaches the final status, the MPP server calls the notifyPlayment API to notify the Ant server.
- The Ant server returns an acknowledgment to the MPP server, confirming that the notification request has been received.
Step 1: Notify the payment result
When the payment achieves its final status, your server calls the notifyPayment API to notify the payment result to the Ant server.
Processing logic
When the payment processing reaches a final status of success or failure, you must send the payment result notification to Alipay+ and pay attention to the following rules.
- If the payment succeeds, return a paymentResult.resultStatus of
Sand paymentResult.resultCode ofSUCCESS. - If the payment fails, return a paymentResult.resultStatus of
Fand an error code that corresponds to a specific reason. For more information about the detailed reason, see Payment result codes. - If the payment is canceled, return a paymentResult.resultStatus of
Fand a paymentResult.resultCode ofORDER_IS_CLOSED.
Sample
Request from the MPP to Alipay+
The MPP sends a payment notification request that indicates a successful payment.
{
"paymentResult": {
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"success"
},
"paymentRequestId":"20200101234567890132",
"paymentId":"202001012345678901322222",
"paymentTime": "2020-01-01T12:01:01+08:30",
"paymentAmount":{
"value":"100",
"currency":"JPY"
},
"payToAmount":{
"value":"1000",
"currency":"KRW"
},
"customerId":"1234567"
}Step 2: Receive acknowledgment
After receiving the payment notification from you, the Ant server returns an acknowledgment response to you. It is recommended that you are able to detect whether the Ant server fails to return the response with the parameter result.resultStatus of S and handle the response according to the instructions below.
result.resultStatus | result.resultCode | Notification status | Actions |
|
| Successful | N/A |
| Multiple possible values exist, such as
| Failed | Take action based on the result code (specified in result.resultCode). |
| Multiple possible values exist, such as
| Unknown | Retry the request. |
No result received | Unknown | Unknown | Retry the request. |