Skip to Content

List Refunds

GET/refunds

Description

Retrieve a list of all refunds. Optionally filter by payment ID or date range.

Headers

HeaderDescriptionRequired
AuthorizationBearer token with your API keyyes

Query Parameters

NameTypeDescriptionRequired
limitnumberMaximum number of refunds to return (default: 10, max: 100).no
payment_idstringFilter refunds by payment ID.no
starting_afterstringCursor for pagination. Returns refunds after this ID.no
ending_beforestringCursor 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',
    },
  }
);

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right