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>'
import requests

url = "https://api.withflex.com/v1/checkout/sessions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.withflex.com/v1/checkout/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withflex.com/v1/checkout/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.withflex.com/v1/checkout/sessions"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.withflex.com/v1/checkout/sessions")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.withflex.com/v1/checkout/sessions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "checkout_sessions": [
    {
      "allow_promotion_codes": false,
      "amount_total": 2500,
      "amount_subtotal": 2500,
      "amount_received": 2500,
      "amount_refunded": 2500,
      "amount_disputed": 2500,
      "cancel_url": "https://example.com",
      "captures": [],
      "disputes": [],
      "capture_method": "automatic",
      "checkout_session_id": "fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "client_reference_id": "example_value",
      "created_at": 2500,
      "expires_at": 2500,
      "invoice": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "hsa_fsa_eligible": false,
      "letter_of_medical_necessity_required": false,
      "metadata": {
        "order_id": "8842",
        "channel": "shopify"
      },
      "mode": "payment",
      "redirect_url": "https://example.com",
      "refunds": [],
      "setup_intent": "fseti_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "shipping_address_collection": false,
      "status": "open",
      "success_url": "https://example.com",
      "fees": [],
      "test_mode": false,
      "total_details": {},
      "setup_future_use": "on_session"
    }
  ]
}
{
"code": "string",
"detail": "string"
}
{
"code": "string",
"detail": "string"
}
{
"code": "string",
"detail": "string"
}
{
"code": "string",
"detail": "string"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
{
"code": "string",
"detail": "string"
}

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:

3

interval
integer<int32> | null

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

Example:

2500

payment_intent
string | null

Filter by payment intent ID.

Example:

"fpi_01J9XR8M3K7VZ8N2YB4WJ6T0RA"

status
enum<string> | null

Filter by checkout session status.

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

"open"

customer
string | null

Filter by customer ID.

Example:

"fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA"

email
string<email> | null

Filter results by customer email address.

Example:

"john.doe@example.com"

subscription
string | null

Filter by subscription ID.

Example:

"fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA"

client_reference_id
string | null

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

Example:

"example_value"

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:

"2026-06-15T14:30:00Z"

created[gte]
string | null

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

Example:

"2026-06-15T14:30:00Z"

created[lt]
string | null

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

Example:

"2026-06-15T14:30:00Z"

created[lte]
string | null

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

Example:

"2026-06-15T14:30: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:

"fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA"

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:

"fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA"

has_disputes
boolean | null

Return only checkout sessions with any associated dispute

Example:

false

Response

Success

An envelope wrapping a list of checkout session objects.

checkout_sessions
object[]
required

The list of checkout sessions.