Check refund transaction
Endpoint: GET
/api/v2/transaction/refund/{refundRefId}
Header Params
Params | Requirement | Data type | Description | Note |
---|---|---|---|---|
X-APPOTAPAY-AUTH | required | String | To create a JWT_TOKEN | |
Content-Type | required | String | Value: application/json | |
X-Request-ID | optional | String | Format is UUIDv4. Request ID for troubleshooting purposes | max:40 |
X-Language | optional | String | Value vi or en ,The value corresponding to the payment link can be in Vietnamese or English (default: vi ) | in:vi,en |
X-Account-Ref-ID | optional | String | 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
Params | Requirement | Data type | Description |
---|---|---|---|
refundRefId | required | String | Refund transaction reference code |
Query params
Params | Requirement | Data type | Description |
---|---|---|---|
type | optional | String | Type of transaction reference
Default: |
Response
Params | Requirement | Data type | Description |
---|---|---|---|
refundId | required | String | Refund transaction code on AppotaPay's side |
transactionId | required | String | Payment transaction code on AppotaPay's side |
partnerRefId | required | String | Partner's refund transaction reference code |
amount | required | Integer | The refunded amount |
currency | required | String | Currency unit (accepts VND) |
reason | required | String | Reason for refund |
status | required | String | Refund status |
createdAt | required | String | Transaction execution time |
refundedAt | optional | String | Refund 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 code | Description |
---|---|
1 | Missing or invalid request information |
36 | The transaction does not exist |
401 | Unauthorized |