- List Checkout Sessions
Returns a paginated list of Checkout Sessions, most recent first.
Pagination and time filters are passed as request headers — Limit, StartingAfterId, EndingBeforeId, DatetimeAfter, and DatetimeBefore — alongside further filtering headers described below.
Integration Methods:
- Host Direct
See the Integration Methods and URLs Section sections of the Development Quick Start guide for details regarding each processing option.
Refers to the name of the program or application that is sending requests to Shift4. This should be the name of the program that you purchased or created. The following special characters are not allowed: $ % : ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =
Refers to the vendor or partner that designed and certified the interface. The information you use in this field should match what Shift4 has on file or what was agreed upon in your Integration Plan. The following special characters are not allowed: $ % : ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =
A security credential used to authenticate API requests. An Access Token is the alias for the merchant account and interface being used.
Obtain one via an Access Token Exchange request, using an authToken and clientGuid.
Filter checkout sessions by their current status. When omitted, all sessions are returned.
| Value | Description |
|---|---|
active | Session is open — payment not yet completed, not expired, and within the allowed failure count |
paid | Payment was completed successfully |
expired | Session expired before a payment was completed successfully |
failed | Payment was attempted but reached the maximum number of failed attempts |
curl -i -X GET \
https://api.shift4.com/api/rest/v1/checkoutsessions/list \
-H 'AccessToken: YOUR_API_KEY_HERE' \
-H 'CompanyName: PAWS' \
-H 'DatetimeAfter: 2024-05-21T09:18:23.283-07:00' \
-H 'DatetimeBefore: 2024-05-21T09:18:23.283-07:00' \
-H 'EndingBeforeId: {EndingBeforeId}' \
-H 'InterfaceName: ForwardPOS' \
-H 'InterfaceVersion: 2.1' \
-H 'Limit: 100' \
-H 'PaymentLinkId: {PaymentLinkId}' \
-H 'StartingAfterId: {StartingAfterId}' \
-H 'Status: active'- Fixed Total
- Customer-chosen amount
{ "result": [ { "dateTime": "2024-05-21T09:18:23.283-07:00", "event": { "type": "checkout_session_created" }, "customer": { "id": "cust_oM1i4j7EsIY7W5vqqF76diGw", "emailAddress": "jordan.smith@example.com", "phoneNumber": "+12025550123", "phoneCountry": "US", "firstName": "Jordan", "middleName": "Riley", "lastName": "Smith", "addressLine1": "Evergreen Terrace 742", "postalCode": "94043", "addressCity": "Mountain View", "addressRegion": "CA", "addressCountry": "US" }, "paymentLink": { "id": "link_8kdskX8DZ8FR6W3acYPXiyAN" }, "checkoutSession": { "id": "chse_wMCUGVZgpf45fWHzKbYWMKmZ", "action": "payment", "clientSecret": "chcs_II2TvLWBrzFniRdjLpgo2zIflaTCzZ5BGPngPZEu0XasgwYRBCHEpyqE0tO9pYocvoOl8alO9w91CAeW0bl3nrTfO9JH4zFDt8pXB2eyoOpOBeuD3XuxPnGKOiTjor0D0vwRfdMR7moSj3K9yLDktQy6KcoZEa9SgP5DHiXg30L1X26EKy4XCxqBdeB4dcC4osPiXBwJqFfhKsKxG4RUD8I8CCeUfvbXnCVSokauaT0AUEk7pkF3TBgN3Q", "url": "https://pay.shift4.com/chse_wMCUGVZgpf45fWHzKbYWMKmZ", "status": "active", "redirectUrl": "https://example.com/checkout/complete", "allowSavedCards": true, "locale": "en", "lastOpened": "2024-05-21T09:18:23.283-07:00", "expiresAt": "2024-05-21T09:18:23.283-07:00", "collectBillingAddress": true, "collectShippingAddress": true, "customFieldsTitle": "Additional information", "customFieldsTitleTranslations": { … }, "customFields": [ … ], "staticFields": { … }, "capture": true, "vendorReference": "ref_123456789", "webhookUrl": "string", "lineItems": [ … ], "lastTransaction": { … }, "customerCreationPolicy": "create" }, "metadata": { "property1": "string", "property2": "string" } } ], "hasMore": true }