Skip to main content
POST
Typescript (SDK)
Creates a new plan with optional base price and feature configurations. See How plans work for concepts and Adding features to plans for item configuration.

Plan Configuration

A plan consists of:
  • Base price - optional recurring charge for the plan itself
  • Items - feature configurations defining what customers get and how they’re billed

Configuring Items

Each item in the items array configures a single feature. There are two types: Consumable features (API calls, messages, credits):
  • Set included for free units that reset each period
  • Set reset.interval to define when balance resets to included
  • Optionally add price for usage beyond included amount
Non-consumable features (seats, storage):
  • Set included for the base allocation
  • Do NOT set reset - usage persists across billing cycles
  • Use billing_method: "prepaid" for upfront payment per unit

Multiple Currencies

To sell a plan in currencies beyond your organization’s default, set additional_currencies on the base price, a feature price, or each tier of a tiered price. Amounts are explicit per currency - no exchange rates are applied - and tier boundaries stay the same across currencies. See Plans for how customers are matched to a currency.

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.4.0
required

Body

application/json
plan_id
string
required

The ID of the plan to create.

Minimum string length: 1
Pattern: ^[a-zA-Z0-9_-]+$
name
string
required

Display name of the plan.

Minimum string length: 1
group
string
default:""

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

description
string | null

Optional description of the plan.

add_on
boolean
default:false

If true, this plan can be attached alongside other plans. Otherwise, attaching replaces existing plans in the same group.

auto_enable
boolean
default:false

If true, plan is automatically attached when a customer is created. Use for free tiers.

price
object

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

items
PlanItem · object[]

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

licenses
object[]

Plans offered as assignable licenses under this plan. The full set replaces existing links.

free_trial
object

Free trial configuration. Customers can try this plan before being charged.

config
object

Miscellaneous plan-level configuration flags.

billing_controls
object

Plan-level billing controls used as customer defaults.

metadata
object

Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.

create_in_stripe
boolean
default:true

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.

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.

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.

version_slug
string | null

User-facing version identity. Defaults to v{n} when the version is minted.

active
boolean

Whether this is the active version of the plan. At most one version is active.

processors
object

Payment processors this plan is connected to. Omitted when unset.

free_trial
object

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

billing_controls
object

Plan-level billing controls used as customer defaults.

customer_eligibility
object
variant_details
object

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