Skip to main content
POST
Typescript (SDK)
Retrieves a single plan by its ID. Returns the latest version by default.

Common Use Cases

Body Parameters

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.3.0
required

Body

application/json
plan_id
string
required

The ID of the plan to retrieve.

Minimum string length: 1
version
number

The version of the plan to get. Defaults to the latest version.

Response

200 - application/json

OK

A plan defines a set of features, pricing, and entitlements that can be attached to customers.

id
string
required

Unique identifier for the plan.

name
string
required

Display name of the plan.

description
string | null
required

Optional description of the plan.

group
string | null
required

Group identifier for organizing related plans. Plans in the same group are mutually exclusive.

version
number
required

Version number of the plan. Incremented when plan configuration changes.

add_on
boolean
required

Whether this is an add-on plan that can be attached alongside a main plan.

auto_enable
boolean
required

If true, this plan is automatically attached when a customer is created. Used for free plans.

price
object | null
required

Base recurring price for the plan. Null for free plans or usage-only plans.

items
object[]
required

Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.

created_at
number
required

Unix timestamp (ms) when the plan was created.

env
enum<string>
required

Environment this plan belongs to ('sandbox' or 'live').

Available options:
sandbox,
live
archived
boolean
required

Whether the plan is archived. Archived plans cannot be attached to new customers.

base_variant_id
string | null
required

Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.

config
object
required

Miscellaneous plan-level configuration flags.

metadata
object
required

Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.

free_trial
object

Free trial configuration. If set, new customers can try this plan before being charged.

variant_details
object

Details about how this variant relates to its latest base plan.

billing_controls
object

Plan-level billing controls used as customer defaults.

customer_eligibility
object