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

ParamRequiredTypeDescriptionNote
X-APPOTAPAY-AUTHrequiredString How to generate JWT_TOKEN
Content-TyperequiredStringValue: application/json
X-Request-IDoptionalStringUUIDv4 format. Request ID to check when a problem occursmax:42
LanguageoptionalStringThe value vi or en corresponding to the payment link will be Vietnamese or English, (default: vi)

in:vi,en

X-Account-Ref-IDoptionalString

Iidentifier of the sub account provided by AppotaPay.

Mandatory be passed over when processing payment for transactions of owner-type sub account

{
"X-APPOTAPAY-AUTH": "JWT_TOKEN",
"Content-Type": "application/json",
"X-Request-ID": "Your_Unique_id",
"Language": "vi",
"X-Account-Ref-ID": "9723f73b-9295-4acb-884b-ab6310c2e653"
}

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