List Checkouts
GET/checkoutsDescription
Retrieve a list of all checkouts. The checkouts are returned in descending order by creation date, with the most recent checkouts appearing first.
Headers
| Header | Description | Required |
|---|---|---|
| Authorization | Bearer token with your API key | yes |
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| limit | number | Maximum number of checkouts to return (default: 10, max: 100). | no |
| starting_after | string | Cursor for pagination. Returns checkouts created after this checkout ID. | no |
| ending_before | string | Cursor for pagination. Returns checkouts created before this checkout ID. | no |
| status | string | Filter by checkout status: pending, completed, expired, or cancelled. | no |
| created_gte | string | Filter checkouts created on or after this ISO 8601 timestamp. | no |
| created_lte | string | Filter 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',
},
}
);