Alipay+ uses the refund API to initiate a refund to the Mobile Payment Provider (MPP). The refund service is only applicable to a transaction that has been successfully paid.
After receiving the refund request, you (the MPP) must ensure that the refund is successful and refund funds to the user as soon as possible. This prevents complaints from users when a transaction is successfully refunded at the merchant side but no refund is received by the user due to failures at your side.
The following figure illustrates the refund flow for a payment:
Figure 1. The refund flow
The following list introduces more information about the refund service that is provided by Alipay+:
- Refund expiration period: A refund can be initiated any time after the transaction is successfully paid and before the refund period expires. You need to allow the expiration period to be at least 366 days, starting from when the initial payment is made.
- Refundable amount: You need to support full refunds, partial refunds, and multiple partial refunds. For a single transaction, the total amount of multiple partial refunds cannot exceed the original amount paid by the user.
- Currency conversion: Alipay+ uses a fixed Foreign Exchange Rate for refunds. A transaction is refunded using the same Foreign Exchange Rate as when the transaction is paid.
- Settlement and fee items: Refund transactions are included in the clearing and settlement files. For each refund, the interchange fee (also known as the Interpartner fee) for the transaction is refunded back to the Acquiring Service Provider (ACQP). Note that the current policies on fee items are subject to adjustment according to Alipay+ Rules.
When processing the refund request, you need to pay attention to the following items:
- Idempotence: The parameter refundRequestId is used for idempotence control. For refund requests with the same refundRequestId, you must perform the idempotence control.
- Refund Amount: The value of the refundAmount parameter, or the total value of the refundAmount parameters in multiple partial refund requests, cannot exceed the value of the paymentAmount parameter in the pay API request.
- Surcharge: If no surcharge exists, refund funds to the user based on the amount specified in the refundFromAmount parameter; If a surcharge exists, refund funds to the user based on the amount specified in the surchargeAmount parameter.
- Return the result: After processing the refund request, you need to return the refund result to Alipay+. For how to return the result and information about the result codes, see More information in the API reference for refund.
- Retry of Alipay+: When no response from the MPP is received, Alipay+ retries the request at incremental time intervals for about 2 hours.
The following sample shows the request and response of the refund API.
Request from Alipay+ to the MPP
Alipay+ sends the refund request.
The MPP returns a response that indicates a successful refund.
For more information about how to use the refund API (such as the field description), see refund.