Get Refund Request For a Payment
https://api-sandbox.letpay.io/refund/payment/MY_PAYMENT_TOKEN
Retrieves the all refund requests of a payment.
Possible statuses:
REQUESTED:
The refund request has been received.PROCESSING:
The refund is being processed.COMPLETED:
The refund has been successfully executed.FAILED:
The refund has failed and could not have been completed.
AUTHORIZATION | API Key |
---|---|
Key | X-Auth-Token |
Value | MY_ACCESS_TOKEN |
Example Request
- 200 - Success
- 404 - Not Found
- 401 - Unauthorized
Example Request
200 - Authenticated
curl --location 'https://api-sandbox.letpay.io/refund/payment/MY_PAYMENT_TOKEN' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
[
{
"refund_id": 1,
"payment_token": "fa5ec5cc-d4d5-439e-8fb5-0368d409dc9b",
"created_at": "2019-06-25",
"refund_status": "PROCESSING"
}
]
Example Request
404 - Not Found
curl --location 'https://api-sandbox.letpay.io/refund/payment/MY_PAYMENT_TOKEN' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-05-14T18:43:02.478+00:00",
"status": 404,
"error": "Not Found",
"message": "This transaction id (MY_PAYMENT_TOKEN) could not be found.",
"path": "/refund/payment/MY_PAYMENT_TOKEN",
"errors": [
{
"code": "00.01.0038",
"description": "This transaction id (MY_PAYMENT_TOKEN) could not be found."
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}
Example Request
401 - Unauthorized
curl --location 'https://api-sandbox.letpay.io/refund/REFUND_ID' \
--header 'X-Auth-Token: INVALID_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-05-14T18:21:23.021+00:00",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/refund/REFUND_ID"
}