Refund
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 Partner. Note that the current policies on fee items are subject to adjustment according to Alipay+ Core Rules.
Processing logic
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: Refund funds to the user based on the amount specified by the refundFromAmount parameter.
- For MPPs that support surcharges, if a surcharge exists, refund funds to the user based on the amount specified by 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. Currently, the intervals are 10s, 60s, 5min, 10min, 30min, 30min, and 30min. The intervals are subject to change in the future by Alipay+.
Sample
The following sample shows the request and response of the refund API.
Request from Alipay+ to the MPP
Alipay+ sends the refund request.
{
"acquirerId": "102218800000000****",
"pspId":"102217200000000****",
"paymentRequestId":"20181129190741010007000000****",
"refundRequestId":"20181129190741020007000000****",
"refundAmount":{
"value":"90",
"currency":"JPY"
},
"refundFromAmount":{
"value":"900",
"currency":"KRW"
},
"refundQuote":{
"quoteId":"123****",
"quoteCurrencyPair":"JPY/KRW",
"quotePrice":"10.0000"
}
}
The MPP returns a response that indicates a successful refund.
{
"result": {
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"Success"
},
"refundId":"20181129190741020007000000****",
"refundTime": "2020-10-10T12:01:01+08:30"
}
Related links
For more information about how to use the refund API (such as the field description), see refund.