Skip to main content
Version: Lastest

Refund: Create

Refund API is provided to refer to a situation where a cardholder wants to refund a card transaction, and is arranged between the cardholder and the merchant directly. A refund transaction is only performed when the charge has CAPTURED status

Several partial refund calls can be made, so long as the total amount refunded is not greater than the total charge amount.

The refund process will take around T+1 to T+3 but it varies from each issuing bank (could be up to 14 days for some issuing banks).

The maximum time to create a refund is T+6 months since the respective transaction was charged.

EndPoint

POST /credit-card/refund

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
transactionIdrequiredStringTransaction ID is returned by AppotaPay when charge successful
merchantRefIdrequiredStringA unique identifier of your choiceMin: 1 Max:40
amountrequiredStringThe amount to be refundedMin: 1000
Support: VND
currencyrequiredStringRefund currencySupport: VND

Example Request

{
"merchantRefId": "7Xthy1kbi",
"transactionId": "01HJAG6Q3XMJBRJW28N1T8D6MM",
"amount": 1000000,
"currency": "VND"
}

Response Params

{
"refundId": "01HQJ41Q7135ZNJTKTWB92BTVH",
"transactionId": "01HQHRWBC773J6CJV9VRZMBXD2",
"merchantRefId": "S68O0whWv",
"amount": 500000,
"currency": "VND",
"status": "success",
"createdAt": "2024-02-26T14:11:12+07:00",
"updatedAt": "2024-02-26T14:11:15+07:00"
}

Success

Http Status Code 200 - OK

ParametersData typeDescription
refundIdStringUnique ID is returned by AppotaPay
transactionIdStringUnique ID of AppotaPay's original transaction
merchantRefIdStringA unique identifier of merchant is sent in the request
amountStringRefund amount
currencyStringRefund currency. Support VND.
statusStringStatus of the refund:
success: Refund request succeeded
error: Refund failed.
pending: Processing
errorInformationObjectFailure reason
errorInformation.errorCodeIntegerError code. See error code
errorInformation.messageStringError message
errorInformation.detailsArray or ObjectError details
errorInformation.details.fieldStringFailure field
errorInformation.details.reasonStringReason why the field failed
createdAtStringTransaction creation time according to RFC-3339 standard, time zone UTC+7
updatedAtStringLast updated time according to RFC-3339 standard, time zone UTC+7

Error

HTTP Status Code != 200