v1

latestOpenAPI 3.1.02026-07-24170121.2 MB

List All Subscriptions

This API returns a list of subscriptions.

get/v1/subscriptions

Query parameters

limitinteger

Number of subscription records to return per page.

pageinteger

Page number of the result set to return, starting at.

orderBystring

Column name to sort the results by (for example, <code>created_at</code>). Pair with <code>sortedBy</code> to set the sort direction. Multiple fields are separated by a semicolon (;)

sortedBy'asc' | 'desc'

Direction that orderBy is sorted by. <br /><b>Possible Values:</b> asc, desc

include'customer' | 'discount'

Embeds the related customer or discount object in each subscription. <br /><b>Possible Values:</b> customer, discount

status[in]'trial' | 'active' | 'pending' | 'passed_due' | 'paused' | 'canceled' | 'unpaid'

Filter subscriptions by multiple statuses (multi-value, comma separated). <br /><b>Possible Values:</b> trial, active, pending, passed_due, paused, canceled, unpaid

status[eq]'trial' | 'active' | 'pending' | 'passed_due' | 'canceled' | 'unpaid' | 'paused' | 'any'

Filters subscriptions by an exact status. Unlike status[in], it can only take 1 value, and contains an additional valid value. <br /><b>Possible Values:</b> trial, active, pending, passed_due, paused, canceled, unpaid, any

created_at[intl]integer

Returns subscriptions created within the last N days.

created_at[eq]string

Returns subscriptions created on the specified date. Recommended format <code>YYYY/MM/DD</code>.

created_at[gte]string

Returns subscriptions created on or after the specified date. Recommended format <code>YYYY/MM/DD</code>.

created_at[lte]string

Returns subscriptions created on or before the specified date. Recommended format <code>YYYY/MM/DD</code>.

created_at[gt]string

Returns subscriptions created after the specified date. Recommended format <code>YYYY/MM/DD</code>.

created_at[lt]string

Returns subscriptions created before the specified date. Recommended format <code>YYYY/MM/DD</code>.

created_at[range]object

Returns subscriptions whose creation date falls between a start and end date (inclusive). Supplied as <code>created_at[range][from]</code> and <code>created_at[range][to]</code>, each in the recommended format <code>YYYY/MM/DD</code>.

payment_type[eq]'card' | 'ach'

Filters subscriptions by payment method. <br /><b>Possible Values:</b> card, ach

planstring

Filters subscriptions by plan, using the plan's code.

customer_idstring

Filters subscriptions belonging to a specific customer, using the customer ID.

excelboolean

If true, exports all matching results without pagination. <br /><b>Possible Values:</b> 0, 1

Response

200

Example response

{
  "data": [
    {
      "object": "Subscription",
      "id": "xlRP0jgPl0ljAXog",
      "customer_id": "jDPAnVxA4xPDVpKM",
      "billing_type": 1,
      "current_period_end": 1726490836,
      "current_period_start": 1726145236,
      "plan_ref": "n2pv6j6p2pvj3Ygq",
      "start_at": 1726490836,
      "status": "trial",
      "trial_end": 1726490836,
      "trial_days": 4,
      "trial_start": 1726145236,
      "created_at": 1726145236,
      "updated_at": 1726145236,
      "payment_type": "card",
      "pause_units_allowed": [
        "days"
      ],
      "plan": {
        "data": {
          "object": "Plan",
          "plan_id": "plan_d2b50d00",
          "amount": 99,
          "interval": "day",
          "interval_count": 1,
          "name": "test",
          "statement_descriptor": "dfghdfhg",
          "currency": "usd",
          "created_at": 1724503321,
          "updated_at": 1724505447
        }
      }
    }
  ],
  "meta": {
    "include": [
      "plan"
    ],
    "pagination": {
      "total": 7,
      "count": 7,
      "per_page": 10,
      "current_page": 1,
      "total_pages": 1
    }
  }
}