Alipay+ DocsAlipay+ Docs

Refund

For successful payment transactions, the refund interface can be used to return funds to the user.

Alipay+ support both full refund and multiple partial refunds. The total amount of multiple partial refunds cannot exceed the original amount paid by the user. The Acquiring Service Provider can initiate a refund transaction anytime within the refund expiration period (365 days by default) since the original payment transaction date.

The following figure illustrates the refund flow: image.png

Figure 2. Refund flow

The refund flow contains the following steps:

  1. The Acquiring Service Provider sends the refund request to Alipay+ with the acquirer paymentRequestId.
  2. Alipay+ returns the refund result to the Acquiring Service Provider.

Processing logic

When call the refund interface, pay attention to the following items:

  • The refundRequestId need to be unique.
  • You might receive different results from Alipay+, follow instructions below to handle the result:

result.resultStatus

result.resultCode

Payment status

Actions

S

SUCCESS

Refund succeeds.

Update the order status in your side to the value such as refunded.

F

...

Refund fails.

Take actions according to the error message in result.resultCode.

U

...

Refund is in processing.

Retry the same request until getting the response. Ensure that the parameters must be the same with the previous one.

No result received

Unknown.

Sample

The Acquiring Service Provider sends a request to Alipay+.

copy
{
 "paymentRequestId":"20181129190741010007000000****",
 "refundRequestId":"20181129190741020007000000****",
 "refundAmount":{
    "value":"100",
    "currency":"JPY"
 } 
}

Alipay+ returns a response to the Acquiring Service Provider.

copy
{
 "acquirerId": "102218800000000****",
 "pspId":"102217200000000****",
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"Success"
  },
 "refundId":"20181129190741020007000000****",
 "refundTime": "2020-10-10T12:01:01+08:30"
}

For more information about how to use the refund interface (such as the field description), see refund.