List Refunds
GET/refundsDescription
Retrieve a list of all refunds. Optionally filter by payment ID or date range.
Headers
| Header | Description | Required |
|---|---|---|
| Authorization | Bearer token with your API key | yes |
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| limit | number | Maximum number of refunds to return (default: 10, max: 100). | no |
| payment_id | string | Filter refunds by payment ID. | no |
| starting_after | string | Cursor for pagination. Returns refunds after this ID. | no |
| ending_before | string | Cursor for pagination. Returns refunds before this ID. | no |
Example Request
const response = await fetch('https://checkout.exodus.com/refunds?limit=20', {
headers: {
Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
},
});Response
SUCCESSFUL RESPONSE
{
"object": "list",
"data": [
{
"id": "ref_1234567890abcdef",
"object": "refund",
"payment_id": "pay_0987654321fedcba",
"amount": 5000,
"currency": "USD",
"status": "succeeded",
"reason": "requested_by_customer",
"created_at": "2024-01-20T15:30:00Z"
},
{
"id": "ref_abcdef1234567890",
"object": "refund",
"payment_id": "pay_fedcba0987654321",
"amount": 2500,
"currency": "USD",
"status": "succeeded",
"reason": "duplicate",
"created_at": "2024-01-19T10:00:00Z"
}
],
"has_more": false
}Pagination
Use cursor-based pagination to navigate through large result sets:
// Get the next page of results
const nextPage = await fetch(
'https://checkout.exodus.com/refunds?limit=20&starting_after=ref_abcdef1234567890',
{
headers: {
Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
},
}
);