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
Parameters | Requirement | Data type | Description | Note |
---|---|---|---|---|
authorizationId | required | String | Charge ID of authorization | |
merchantRefId | required | String | Your 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
Parameters | Data type | Required | Description |
---|---|---|---|
merchantRefId | String | required | A unique identifier of merchant is sent in the request |
authorizationId | String | required | Charge ID of authorization |
reversalId | String | required | ID of the reversal transaction that AppotaPay generates and returns to merchant |
amount | Number | required | The amount that requested to be reversed for this charge |
status | String | required | Status 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 |
errorInformation | Object | optional | Failure reason |
errorInformation.errorCode | Integer | required | Error code. See error code |
errorInformation.message | String | required | Error message |
errorInformation.details | Array or Object | optional | Error details |
errorInformation.details.field | String | required | Failure field |
errorInformation.details.reason | String | required | Reason why the field failed |
createdAt | String | required | Time create is made according to RFC-3339 standard, time zone UTC+7 |
updatedAt | String | required | Time update is made according to RFC-3339 standard, time zone UTC+7 |
reversedAt | String | optional | Time reversed is made according to RFC-3339 standard, time zone UTC+7 |
Error
HTTP Status Code !=
200