Skip to main content
GET
/
v1
/
checkout
/
sessions
List Checkout Sessions
curl --request GET \
  --url https://api.withflex.com/v1/checkout/sessions \
  --header 'Authorization: Bearer <token>'
{
  "checkout_sessions": [
    {
      "allow_promotion_codes": false,
      "amount_total": 0,
      "amount_subtotal": 0,
      "amount_received": 0,
      "amount_refunded": 0,
      "amount_disputed": 0,
      "cancel_url": "https://example.com",
      "captures": [],
      "disputes": [],
      "capture_method": "automatic",
      "checkout_session_id": "obj_01EXAMPLE00000000000000000",
      "client_reference_id": "string",
      "created_at": 0,
      "defaults": {},
      "expires_at": 0,
      "invoice": "obj_01EXAMPLE00000000000000000",
      "hsa_fsa_eligible": false,
      "letter_of_medical_necessity_required": false,
      "metadata": {},
      "mode": "payment",
      "origin": "shopify",
      "payment_intents": [],
      "redirect_url": "https://example.com",
      "refunds": [],
      "setup_intent": "string",
      "shipping_options": {},
      "shipping_address_collection": false,
      "shipping_details": {},
      "status": "open",
      "success_url": "https://example.com",
      "fees": [],
      "custom_text": {},
      "subscription_data": {},
      "tax_rate": {},
      "tax_calculation_mode": "exclusive",
      "test_mode": false,
      "total_details": {},
      "visit_type": "cbtSleep",
      "payment_method_options": {},
      "platform_fees": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Query Parameters

limit
integer<int64> | null

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

Required range: x >= 1
Example:

10

offset
integer<int64> | null

Number of objects to skip before returning results.

Example:

0

interval
integer<int32> | null

Filter by time interval in days (e.g., 30 for last 30 days).

Example:

0

payment_intent
string | null

Filter by payment intent ID.

Example:

"obj_01EXAMPLE00000000000000000"

status
enum<string> | null

Filter by checkout session status (e.g., open, complete, expired).

Available options:
open,
paid,
complete,
canceled,
expired
Example:

"open"

customer
string | null

Filter by customer ID.

Example:

"obj_01EXAMPLE00000000000000000"

email
string<email> | null

Filter results by customer email address.

Example:

"john.doe@example.com"

subscription
string | null

Filter by subscription ID.

Example:

"obj_01EXAMPLE00000000000000000"

client_reference_id
string | null

Filter by the client reference ID you provided when creating the checkout session.

Example:

"string"

expand_customer
boolean | null

If true, expands the customer object in the response.

Example:

false

expand_payment_intent
boolean | null

If true, expands the payment intent object in the response.

Example:

false

expand
string
default:""

Comma-separated list of related objects to expand in the response.

Example:

""

created[gt]
string | null

Return sessions created after this timestamp (exclusive). ISO 8601 format.

Example:

"2024-01-01T00:00:00Z"

created[gte]
string | null

Return sessions created at or after this timestamp (inclusive). ISO 8601 format.

Example:

"2024-01-01T00:00:00Z"

created[lt]
string | null

Return sessions created before this timestamp (exclusive). ISO 8601 format.

Example:

"2024-01-01T00:00:00Z"

created[lte]
string | null

Return sessions created at or before this timestamp (inclusive). ISO 8601 format.

Example:

"2024-01-01T00:00:00Z"

starting_after
string | null

A cursor for use in pagination. starting_after is a checkout session ID that defines your place in the list. For instance, if you make a list request and receive 20 checkout sessions, ending with fcs_xyz, your subsequent call can include starting_after=fcs_xyz to fetch the next page.

Example:

"obj_01EXAMPLE00000000000000000"

ending_before
string | null

A cursor for use in pagination. ending_before is a checkout session ID that defines your place in the list. For instance, if you make a list request and receive 20 checkout sessions, starting with fcs_abc, your subsequent call can include ending_before=fcs_abc to fetch the previous page.

Example:

"obj_01EXAMPLE00000000000000000"

has_disputes
boolean | null

Return only checkout sessions with any associated dispute

Example:

false

Response

Success

checkout_sessions
object[]
required