Alipay+ DocsAlipay+ Docs

Refund

This guide explains how to implement the refund API to process refund requests from Alipay+.

Refunds are applicable only to transactions that have already been successfully paid. A refund can be triggered by several events, including:

  • A merchant initiates a refund request.
  • A merchant partially captures the payment.
  • The merchant partially releases the authorization.
  • The merchant releases the authorization on a different day than it was created.
  • Mastercard sets the authorization to expiry.
  • The authorization expires automatically.

MPP requirements

To prevent user complaints, you must ensure that when you receive a refund request, the refund succeeds and that funds are returned to the user as soon as possible.

Refund rules

The following table introduces more information about the Alipay+ refund service:

Items

Details

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

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: The current policies on fee items are subject to adjustment according to Alipay+ Core Rules.

Processing logic

When receiving the refund API request, take the following into consideration:

  • Handle the request parameters properly:
    • refundRequestId: The unique ID that is assigned by Alipay+ to identify a refund request. This field is an API idempotency field. The MPP must regard the requests with the same refundRequestId as repeated and process them only once. The MPP is recommended to check the consistency of the following key request parameters: refundAmount, refundFromAmount, refundPromoInfo, and surchargeInfo. If any values differ from the previous request, the MPP needs to return the REPEAT_REQ_INCONSISTENT result code.
  • Return the response properly:
    • result: The refund result. The MPP needs to return the result (specified on the result parameter) based on the business processing result as follows:
      • If the refund succeeds, set the value of result.resultStatus to S and the value of result.resultCode to SUCCESS.
      • If the refund fails, set the value of result.resultStatus to F and the value of result.resultCode accordingly. See the Result code section.
      • If the refund result is unknown, set the value of result.resultStatus to U and the value of result.resultCode accordingly. See the Result code section.

Sample

The following samples show the request and response when the Alipay+ calls the refund API.

Request from Alipay+ to the MPP

copy
{
 "acquirerId": "1022188000000000000",
 "pspId":"1022172000000000000",
 "paymentRequestId":"201811291907410100070000000000",
 "paymentId": "201811291907410100070000000000",
 "refundRequestId":"201811291907410200070000000000",
 "refundAmount":{
    "value":"90",
    "currency":"JPY"
 },
 "refundFromAmount":{
    "value":"900",
    "currency":"KRW"
 },
 "refundQuote":{
    "quoteId":"1230000",
    "quoteCurrencyPair":"JPY/KRW",
    "quotePrice":"10.0000"
  }
}

Response from the MPP to Alipay+

copy
{
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"Success"
  },
 "refundId":"201811291907410200070000000000",
 "refundTime": "2020-10-10T12:01:01+08:30"
}