Refund API

Endpoint
POST {BASE_URL}/api/v2.0/payments/refund

Refund API is used to request a refund based on the order amount. A single payment order can be refunded in multiple batches, and the total refund amount must not exceed the actual payment amount. The refund currency must be the same as the payment order currency.

Request Body
paymentIdstringREQUIRED

AlphaPay order ID

refundRequestIdstring

Merchant refund ID

refundobjectREQUIRED

Refund Details

Hide child parameters
refund.refundAmountobjectREQUIRED

Refund amount

Hide child parameters
refund.refundAmount.valuestringREQUIRED

The value of refund amount. All amount figures are based on the minimum denomination unit of given currency. Take CAD as an example, 100 means 1.00CAD

refund.descriptionstring

Remark of the refund (maximum length 128 characters) <= 128 characters

refund.notifyUrlstring

Refund notification URL, the address to push the refund success notification after the refund is successful, see Notification for details

Refund Request Body
{
    "paymentId": "string",
    "refundRequestId": "string",
    "refund": {
        "refundAmount": {
            "value": "string"
        },
        "description": "string",
        "notifyUrl": "string"
    }
}

Response (200 OK)
refundIdstring

AlphaPay refund ID

paymentIdstring

AlphaPay order ID

refundRequestIdstring

Merchant refund ID

refundobject

Refund Details

Hide child parameters
refund.refundAmountobject

Refund amount

Hide child parameters
refund.refundAmount.valuestring

The value of refund amount. All amount figures are based on the minimum denomination unit of given currency. Take CAD as an example, 100 means 1.00CAD

refund.descriptionstring

Remark of the refund (maximum length 128 characters) <= 128 characters

refund.notifyUrlstring

Refund notification URL, the address to push the refund success notification after the refund is successful, see Notification for details

refundTimestring <date-time>

Refund Time
Follow the ISO8601 standard, e.g. 2019-05-28T12:12:12+08:00

resultobject

Process result

Hide child parameters
result.resultCodestring

Process result code, please refer to resultCode

result.resultMessagestring

Process result message

result.resultStatusstring

The status of an API call, please refer to resultStatus

  • S: API call succeeded.
  • F: API call failed, the resultMessage field will provide a detailed description of the error, which could be caused by either the merchant or the platform, when an error occurs during API invocation.
  • U: In cases where the handling result is unknown or in an intermediate state. Such as receiving a PAYMENT_IN_PROCESS status after submitting a payment order, the query interface can be used to confirm the status of the payment result.
Refund Response
{
    "refundId": "string",
    "paymentId": "string",
    "refundRequestId": "string",
    "refund": {
        "refundAmount": {
            "value": "string"
        },
        "description": "string",
        "notifyUrl": "string"
    },
    "refundTime": "2019-08-24T14:15:22Z",
    "result": {
        "resultCode": "string",
        "resultMessage": "string",
        "resultStatus": "S"
    }
}