Skip to main content
GET
/
v1
/
subscriptions
List Subscriptions
curl --request GET \
  --url https://api.withflex.com/v1/subscriptions \
  --header 'Authorization: Bearer <token>'
{
  "subscriptions": [
    {
      "subscription_id": "obj_01EXAMPLE00000000000000000",
      "created_at": "2024-01-01T00:00:00Z",
      "items": [],
      "status": "incomplete",
      "cancel_at_period_end": false,
      "current_period_end": "string",
      "current_period_start": "string",
      "metadata": {},
      "test_mode": false,
      "client_secret": {},
      "proration_behavior": "always_invoice",
      "trial_start": "string",
      "trial_end": "string",
      "cancel_at": "2024-01-01T00:00:00Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.withflex.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Query Parameters

customer
string | null

Filter by customer ID.

Example:

"obj_01EXAMPLE00000000000000000"

expand_customer
boolean | null

If true, expands the customer object in the response.

Example:

false

starting_after
string | null

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

Example:

"obj_01EXAMPLE00000000000000000"

ending_before
string | null

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

Example:

"obj_01EXAMPLE00000000000000000"

status
enum<string> | null

Filter by subscription status (e.g., active, canceled, past_due).

Available options:
incomplete,
incomplete_expired,
trialing,
active,
past_due,
canceled,
unpaid,
paused
Example:

"incomplete"

offset
integer<int32> | null

Number of objects to skip before returning results.

Required range: x >= 0
Example:

0

limit
integer<int32> | 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 >= 0
Example:

10

expand
string
default:""

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

Response

Success

subscriptions
object[]
required