Skip to Content

List Checkouts

GET/checkouts

Description

Retrieve a list of all checkouts. The checkouts are returned in descending order by creation date, with the most recent checkouts appearing first.

Headers

HeaderDescriptionRequired
AuthorizationBearer token with your API keyyes

Query Parameters

NameTypeDescriptionRequired
limitnumberMaximum number of checkouts to return (default: 10, max: 100).no
starting_afterstringCursor for pagination. Returns checkouts created after this checkout ID.no
ending_beforestringCursor for pagination. Returns checkouts created before this checkout ID.no
statusstringFilter by checkout status: pending, completed, expired, or cancelled.no
created_gtestringFilter checkouts created on or after this ISO 8601 timestamp.no
created_ltestringFilter checkouts created on or before this ISO 8601 timestamp.no

Example Request

const response = await fetch('https://checkout.exodus.com/checkouts?limit=20&status=completed', {
  headers: {
    Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
  },
});

Response

SUCCESSFUL RESPONSE
{
  "object": "list",
  "data": [
    {
      "id": "chk_1234567890abcdef",
      "object": "checkout",
      "amount": 5000,
      "currency": "USD",
      "description": "Premium Plan - Monthly",
      "status": "completed",
      "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
      "success_url": "https://yoursite.com/success",
      "customer_email": "[email protected]",
      "payment_id": "pay_0987654321fedcba",
      "metadata": {
        "order_id": "12345"
      },
      "expires_at": "2024-01-16T12:00:00Z",
      "created_at": "2024-01-15T12:00:00Z",
      "completed_at": "2024-01-15T12:30:00Z"
    },
    {
      "id": "chk_abcdef1234567890",
      "object": "checkout",
      "amount": 2500,
      "currency": "USD",
      "description": "Basic Plan - Monthly",
      "status": "completed",
      "checkout_url": "https://checkout.exodus.com/pay/chk_abcdef1234567890",
      "success_url": "https://yoursite.com/success",
      "customer_email": "[email protected]",
      "payment_id": "pay_fedcba0987654321",
      "metadata": {},
      "expires_at": "2024-01-15T12:00:00Z",
      "created_at": "2024-01-14T12:00:00Z",
      "completed_at": "2024-01-14T12:15:00Z"
    }
  ],
  "has_more": true
}

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/checkouts?limit=20&starting_after=chk_abcdef1234567890',
  {
    headers: {
      Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
    },
  }
);

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help