Checkout sessions

List checkout sessions

Newest first, scoped to your business and your key's mode. A test key never sees a live session and a live key never sees a test one. Paged with a cursor: pass the `id` of the last session on a page as `before` to get the next, older page. A page with fewer than `limit` sessions is the last one (a page of exactly `limit` may be followed by an empty one). Paging is exact: a session created while you page never shifts a page, so nothing is shown twice or skipped. The `status` filter applies to every session you have, however old, and an unclaimed session past its `expires_at` counts as `expired`. Keep `status` and `reference` the same on every page of one walk.

Before you call this endpoint

  • An API key needs the payments:read scope.
  • Once your business has an IP allowlist, every live key must call from an address on it.
  • Guide: Checkout
GET
/api/b/v1/checkout/sessions

Newest first, scoped to your business and your key's mode.

A test key never sees a live session and a live key never sees a test one.

Paged with a cursor: pass the id of the last session on a page as before to get the next, older page. A page with fewer than limit sessions is the last one (a page of exactly limit may be followed by an empty one). Paging is exact: a session created while you page never shifts a page, so nothing is shown twice or skipped. The status filter applies to every session you have, however old, and an unclaimed session past its expires_at counts as expired. Keep status and reference the same on every page of one walk.

Query Parameters

limit?Limit
Range1 <= value <= 200
Default50
status?|

open, complete, expired or failed.

reference?|

Find the session for one reference.

before?|

The id of the last session on the previous page. Omit for the newest page.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/b/v1/checkout/sessions"
[  {    "id": "string",    "url": "string",    "status": "string",    "is_test": true,    "amount_minor": 0,    "currency": "string",    "reference": "string",    "customer": {      "name": "Aline Uwase",      "email": "aline@example.com",      "phone": "250788123456"    },    "methods": [      "string"    ],    "success_url": "string",    "cancel_url": "string",    "metadata": {},    "embed_origins": [      "string"    ],    "account": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",    "charge_id": "cf8b747b-a752-4d0a-9a4d-7d19fc1769f3",    "failure_reason": "string",    "expires_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "completed_at": "2019-08-24T14:15:22Z",    "expired_at": "2019-08-24T14:15:22Z",    "failed_at": "2019-08-24T14:15:22Z"  }]