Get Refunds
curl --request GET \
--url https://api.atoa.me/api/refund/{paymentRequestId} \
--header 'Authorization: Bearer <token>'
[
{
"refundId": "a7c82e45-9f31-42b6-8d15-7e63f1b92c4d",
"paymentRequestId": "5e8b2c73-1f64-4a97-9c38-d2f6ae15b8c2",
"paymentIdempotencyId": "ATOA1234567890123",
"status": "INITIATED",
"paidAmount": "250.75",
"refundAmount": "25.50",
"currency": "GBP",
"refundNotes": "Customer requested refund",
"orderId": "987654321",
"refundType": "PARTIAL",
"createdAt": "2023-11-15T14:32:45.789Z",
"updatedAt": "2023-11-15T14:32:45.789Z"
}
]
This API is used to get the refund details for a given payment request id. It returns information about the refund transaction including the amount, status, and related payment details.
Authorization
Bearer <token>
Using a sandbox token with a production payment request ID, or a production token with a sandbox payment request ID, will result in an error.
Request Body Schema
The payment request id is required for this step, which you’ll receive it from the process-payment API when generating a payment request.
Response
The API returns a refund payment object with the following fields:
A unique UUID for the refund transaction.
The ID of the original payment request. Refer to process-payment
The unique identifier for the payment transaction.
The current status of the refund payment
(e.g.,
INITIATED,PENDING,COMPLETED,FAILED) - INITIATED : The refund request has been
raised - PENDING : The refund is being ready to be processed - COMPLETED : The
refund payment has been completed - FAILED : The refund payment has failed -
CANCELLED : The refund payment has been cancelled
The original amount that was paid.
The amount that was refunded.
The three-letter currency code (e.g., GBP).
The notes associated with the refund.
The ID of the order associated with this refund.
The type of refund (e.g., PARTIAL, FULL).
The timestamp when the refund was created.
The timestamp when the refund was last updated.
curl --request GET \
--url https://api.atoa.me/api/refund/{paymentRequestId} \
--header 'Authorization: Bearer <token>'
[
{
"refundId": "a7c82e45-9f31-42b6-8d15-7e63f1b92c4d",
"paymentRequestId": "5e8b2c73-1f64-4a97-9c38-d2f6ae15b8c2",
"paymentIdempotencyId": "ATOA1234567890123",
"status": "INITIATED",
"paidAmount": "250.75",
"refundAmount": "25.50",
"currency": "GBP",
"refundNotes": "Customer requested refund",
"orderId": "987654321",
"refundType": "PARTIAL",
"createdAt": "2023-11-15T14:32:45.789Z",
"updatedAt": "2023-11-15T14:32:45.789Z"
}
]