refund

1. Overview

Endpoint: https://open.alipay.hk/aps/api/intl/wallet/v1/payments/refund

Use this interface to initiate a refund of a successful payment.

When a merchant submits a refund request through Acquirer, Acquirer sends the refund request to AlipayHK. AlipayHK returns the refund result based on the status of the payment transaction that is associated with this refund. Meanwhile, AlipayHK routes the refund request to Issuing Participant.

2. Sample

  1. Issuing Participant sends the refund request to AlipayHK.
copy
{
 "acquirerId": "102218800000000****",
 "pspId":"102217200000000****",
 "paymentRequestId":"20181129190741010007000000****",
 "refundRequestId":"20181129190741020007000000****",
 "refundAmount":{
    "value":"90",
    "currency":"HKD"
 },
 "refundFromAmount":{
    "value":"90",
    "currency":"HKD"
 }
}
  1. AlipayHK returns the refund result to Issuing Participant.
copy
{
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"Success"
  },
 "refundId":"20181129190741020007000000****",
 "refundTime": "2020-10-10T12:01:01+08:30"
}

3. Structure

3.1 Request

No.

Field

Description

1

acquirerId

MANDATORY String (64)

The unique ID that is assigned by AlipayHK to identify an Acquirer.

2

pspId

MANDATORY String (64)

The unique ID that is assigned by AlipayHK to identify a ISS Participant..

3

paymentRequestId

MANDATORY String (64)

The unique ID that is assigned by the payment initiator to identify an order payment.

4

refundRequestId

MANDATORY String (64)

The unique ID that is assigned by the payment initiator to identify a refund.

5

refundAmount

MANDATORY Amount

The refund amount paid by the payment executor for this refund.

6

refundFromAmount

MANDATORY Amount

The refund amount collected by the payment executor for this refund.

3.2 Response

No.

Field

Description

1

result

MANDATORY Result

Request result, which contains information such as status and error codes. 

2

refundId

OPTIONAL String (64)

The unique ID that is assigned by the payment executor to identify a refund.

3

refundTime

OPTIONAL Datetime

The date and time when the refund reaches a final state of success or failure.

4. Result code

No.

resultCode

resultStatus

resultMessage

1

SUCCESS

S

Success

2

REFUND_AMOUNT_EXCEED

F

The total refund amount exceeds the payment amount.

3

USER_AMOUNT_EXCEED

F

The user balance exceeds the balance limit.

4

CURRENCY_NOT_SUPPORT 

F

The currency is not supported.

5

INVALID_ORDER_STATUS

F

The order status is invalid for this operation.

6

ORDER_NOT_EXIST

F

The order doesn't exist.

7

PROCESS_FAIL

F

A general business failure occurred. Don't retry.

8

PARAM_ILLEGAL

F

Illegal parameters exist. For example, a non-numeric input, or an invalid date.

9

REPEAT_REQ_INCONSISTENT

F

Repeated requests are inconsistent.

10

KEY_NOT_FOUND

F

The key is not found.

11

ACCESS_DENIED

F

The access is denied.

12

REQUEST_TRAFFIC_EXCEED_LIMIT

U

The request traffic exceeds the limit.

13

INVALID_API

F

The called API is invalid or not active.

14

INVALID_CLIENT

F

The client is invalid.

15

INVALID_SIGNATURE

F

The signature is invalid.

16

METHOD_NOT_SUPPORTED

F

The server does not implement the requested HTTP method.

17

MEDIA_TYPE_NOT_ACCEPTABLE

F

The server does not implement the media type that is acceptable to the client.

18

UNKNOWN_EXCEPTION 

U

An API calling is failed, which is caused by unknown reasons.