Return payment results
After a user makes a payment, you can return the payment result to Alipay+ in the following three ways:
- Return the payment result in the response of the pay API.
- Return the payment result in the asynchronous request of the notifyPayment API.
- Return the payment result in the response of the inquiryPayment API.
If the payment reaches a final status (success or failure), ensure the returned payment results of the preceding three ways are consistent.
Note: Returning payment results by the inquiryPayment API and the notifyPayment API is optional.
Integration requirements
It is recommended that the MPP support the following:
- Support the inquiryPayment API to ensure that Alipay+ receives the final payment result (success or failure). For how to respond to a payment result inquiry through the inquiryPayment API, see Respond to payment inquiry.
- Support the notifyPayment API so that Alipay+ can receive your payment result notification. Learn more about how to notify of the payment result through the notifyPayment API.