Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

Refund

After a transaction is paid successfully, you can issue a refund by using the refund API or APO Global Merchant Portal. The refund handling fee, execution exchange rate, refund period, and whether partial refunds are supported are subject to the agreement between you and the acquirer.

Refund using API

Flow figure

image.png

Figure 1. Refund workflow

Initiate a refund

The following requirements for a refund request must be satisfied when you use the refund API. Otherwise, the corresponding error codes are to be returned by APO:

Refund requirement

Error code

Refund currency

The value of the parameter refundAmount.currency in the refund request needs to be consistent with the value of the parameter paymentAmount.currency used for initiating a payment.

CURRENCY_NOT_SUPPORT

Refund amount

The value of the parameter refundAmount.value in the refund request must be no less than the minimum refund amount (which is usually the same as the minimum payment amount) and no greater than the refundable amount of a payment.

REFUND_AMOUNT_EXCEED

Payment status

For card payment methods:

  • Only captured payments can be refunded.
  • For a payment where a chargeback occurs and the liability is not judged, a refund is not allowed.

ORDER_STATUS_INVALID

Refund period

The refund is allowed only when the refund is issued within the refund period of the corresponding payment method.

REFUND_WINDOW_EXCEED

Table 1. Refund requirements

The key parameters contained in refund requests are listed as follows (For details, see the refund API):

Parameter

Description

refundRequestId

The unique identifier that you assign to a payment.

paymentId

The unique identifier that Antom assigns to the original payment to be refunded.

refundAmount

The refund amount must be no less than the minimum refund amount (which is usually the same as the minimum payment amount) and no greater than the refundable amount of a payment.

Table 2. Key parameters of refund requests

Obtain the refund result

After you initiate a refund request, you can use either of the following three ways to obtain the refund result:

  • Obtain the refund result by checking the response returned through the refund API.
  • Call the inquiryRefund API to inquire about the refund status.

Check the refund status through the refund API

After you call the refund API, APO synchronously returns the refund result. The resultStatus parameter in the API response indicates the refund status of this payment. The values of resultStatus are explained as follows:

resultStatus

Explanation

S

The refund is successful.

F

The refund failed. See the error codes of the refund API for troubleshooting.

U

The refund is being processed. you can obtain the final refund result through the inquiryRefund API.

Table 3. Values of resultStatus

Inquire about the refund status

Regardless of the payment method used for a payment, you can call the inquiryRefund API to inquire about the refund status. The refund status is indicated by the refundStatus parameter in the response. The following table explains the possible values of the refundStatus parameter:

refundStatus

Explanation

SUCCESS

The refund is successful.

PROCESSING

The refund is being processed.

FAIL

The refund failed.

Table 4. Values of refundStatus in the inquiryRefund API

Refund in APO Merchant Portal

You can issue a refund on APO Merchant Portal. For more information about how to issue a refund and view the refund result, see Refund transactions on APO Merchant Portal.