Skip to main content
Version: Lastest

Check refund transaction

Endpoint: GET /api/v2/transaction/refund/{refundRefId}

Header Params

ParamsRequirementData typeDescriptionNote
X-APPOTAPAY-AUTHrequiredStringTo create a JWT_TOKEN
Content-TyperequiredStringValue: application/json
X-Request-IDoptionalStringFormat is UUIDv4. Request ID for troubleshooting purposesmax:40
X-LanguageoptionalStringValue vi or en,The value corresponding to the payment link can be in 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",
"X-Language": "vi",
"X-Account-Ref-ID": "9723f73b-9295-4acb-884b-ab6310c2e653"
}

URL params

ParamsRequirementData typeDescription
refundRefIdrequiredStringRefund transaction reference code

Query params

ParamsRequirementData typeDescription
typeoptionalString

Type of transaction reference

TRANSACTION_ID Get by transaction code on AppotaPay's side

PARTNER_ORDER_ID Get by transaction code on the Partner's side

Default: TRANSACTION_ID

Response

ParamsRequirementData typeDescription
refundIdrequiredStringRefund transaction code on AppotaPay's side
transactionIdrequiredStringPayment transaction code on AppotaPay's side
partnerRefIdrequiredStringPartner's refund transaction reference code
amountrequiredIntegerThe refunded amount
currencyrequiredStringCurrency unit (accepts VND)
reasonrequiredStringReason for refund
statusrequiredStringRefund status
createdAtrequiredStringTransaction execution time
refundedAtoptionalStringRefund execution time if the refund transaction is successful

Example

Response

{
"refundId": "f28a4ac3-e407-45f1-902b-bc05c6c50dfa",
"transactionId": "AP241453209745",
"partnerRefId": "5f61cf4f41e2b",
"amount": 10000,
"currency": "VND",
"reason": "test refund",
"status": "success",
"createdAt": "2024-09-11T11:21:17+07:00",
"refundedAt": "2024-09-11T11:21:17+07:00"
}

Error

{
"errorCode": 1,
"message": "Invalid Params"
}

Error code table

Error codeDescription
1Missing or invalid request information
36The transaction does not exist
401Unauthorized