Payment Result Notification
Alipay uses this interface to send the payment result to the merchant when the payment processing reaches a final state of success or failure. Merchants promote merchant-side transactions based on the payment result.
In the following example, an e-wallet user buys an 80 EUR item on a merchant website. Alipay sends the payment result to the merchant. The use of Payment Result Notification interface consists of the following steps:
1. Alipay sends the payment result notification request to the merchant.
The following example shows a successful payment result.
The following example shows a failed payment result.
2. Merchant processes the payment notification and returns the processing result to Alipay.
By returning the following result to Alipay, the merchant indicates that the payment notification is successfully recepted by the merchant.
Payment notification type. Valid values are:
The payment result
MANDATORY String (64)
The unique ID that is assigned by a merchant to identify a payment request. Special characters are not supported.
OPTIONAL String (64)
The unique ID that is assigned by Alipay to identify a payment.
A one-to-one correspondence between paymentId and paymentRequestId exists.
The payment amount that the merchant requests to receive in the order currency.
The date and time when the payment is created, which follows the ISO 8601 standard.
The date and time when the payment reaches a final state of success or failure, which follows the ISO 8601 standard.
Information about the customer of payment service provider (PSP).
The request result, which contains information related to the request result, such as status and error codes.
This section provides additional information about certain parameters. See the following parameters for details:
- result (in the notification request sent by Alipay):
Payment result. If the value of result.resultStatus is S, then the payment succeeds. If the value is F, the payment fails. The value of result.resultStatus will not be U for the payment result notification.
This field is returned only when the value of result.resultStatus is S.
In the in-store payment scenario, paymentCode is passed in through this field, and merchants can display the code to the customer.
#Result process logic
For different request results, different actions are to be performed. See the following list for details:
For the result parameter in the response:
- If the value of result.resultStatus is S, the payment result notification succeeds. Alipay doesn't take any further actions.
- If the value of result.resultStatus is F, the payment result notification fails. Alipay monitors such results and might intervene if needed.
- If the value of result.resultStatus is U, the notification request might have failed due to system or network reasons. Alipay will retry. The retry lasts for 24 hours and the retry interval increases during the retry span, such as 5s, 30s, 1m, 5m, and so on.
This section helps you identify and resolve problems. See the following table for details:
An API calling is failed, which is caused by unknown reasons.