Skip to main content
Version: Lastest

Reverse Authorization

This API provides a reversing charge when the charge has AUTHORIZED status and hasn't yet been captured. You can use this API to cancel an authorization.

The maximum time to create a reversal is T+7 days since the respective transaction was authorized. If the transaction isn't captured or reversed after T+7 days, our system will perform reversal automatically.

EndPoint

POST /credit-card/reversal

Header Params

{
Content-Type: "application/json",
X-APPOTAPAY-AUTH: "your_auth_token",
Language: "en", // option vi | en, default vi
X-Request-ID: "your_request_id" // optional - easy to debug request
}

Request Params

ParametersRequirementData typeDescriptionNote
authorizationIdrequiredStringCharge ID of authorization
merchantRefIdrequiredStringYour reference ID for identifying the transaction

Example Request

{
"merchantRefId": "MufRIHgy13",
"authorizationId": "01HJAFB1GMVTC74SN2FMA5PG5X"
}

Response Params

{
"reversalId": "01HQHS26CFK4CEGE2QW0PATV5B",
"authorizationId": "01HQHRZQNJE4BWRB8P9P5Z8BE7",
"merchantRefId": "MufRIHgy11",
"amount": 1000000,
"currency": "VND",
"status": "success",
"createdAt": "2024-02-26T10:59:13+07:00",
"updatedAt": "2024-02-26T10:59:15+07:00",
"reversedAt": "2024-02-26T10:59:14+07:00"
}

Success

Http Status Code 200 - OK

ParametersData typeRequiredDescription
merchantRefIdStringrequiredA unique identifier of merchant is sent in the request
authorizationIdStringrequiredCharge ID of authorization
reversalIdStringrequiredID of the reversal transaction that AppotaPay generates and returns to merchant
amountNumberrequiredThe amount that requested to be reversed for this charge
statusStringrequiredStatus of the reverse authorization
success: Reverse Authorization request is success
error: Reverse Authorization is failed with detail failure reason
pending: Reverse Authorization request is processing
errorInformationObjectoptionalFailure reason
errorInformation.errorCodeIntegerrequiredError code. See error code
errorInformation.messageStringrequiredError message
errorInformation.detailsArray or ObjectoptionalError details
errorInformation.details.fieldStringrequiredFailure field
errorInformation.details.reasonStringrequiredReason why the field failed
createdAtStringrequiredTime create is made according to RFC-3339 standard, time zone UTC+7
updatedAtStringrequiredTime update is made according to RFC-3339 standard, time zone UTC+7
reversedAtStringoptionalTime reversed is made according to RFC-3339 standard, time zone UTC+7

Error

HTTP Status Code != 200