Skip to main content
POST
Typescript (SDK)
Updates an existing plan. By default, creates a new version of the plan. See Adding features to plans for item configuration.
Updates create a new plan version by default. Existing customers remain on their current version until their subscription renews or they explicitly upgrade.

Updating Items

When updating items, you must provide the complete items array. The new array replaces the existing configuration entirely. To update a single feature’s configuration while keeping others unchanged, include all existing items with the modified values.

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 update.

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

Display name of the plan.

Minimum string length: 1
description
string
add_on
boolean

Whether the plan is an add-on.

auto_enable
boolean

Whether the plan is automatically enabled.

price
BasePrice · object | null

The price of the plan. Set to null to remove the base price.

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
FreeTrialParams · object | null

The free trial of the plan. Set to null to remove the free trial.

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
version
number
archived
boolean
default:false
base_plan_id
string | null

The base plan this plan should be linked to as a variant. Set to null to detach it from its base plan.

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

The new ID to use for the plan. Can only be updated if the plan has not been used by any customers.

Minimum string length: 1
Pattern: ^[a-zA-Z0-9_-]+$
disable_version
boolean
all_versions
boolean

Apply the update diff to all versions of this plan. Mutually exclusive with disable_version.

migration
object
force_version
boolean

Force versioning even when no customers exist. Mutually exclusive with disable_version.

update_variant_ids
string[]

Variant plan IDs to apply this update to. Empty or omitted means no propagation.

update_license_parents
object[]

Parent plan versions that should receive this license-plan update.

variants
object[]

Additive variant updates for this base plan. Missing variants are created when name is provided.

is_default
boolean

Whether this is the org's default plan. Cannot be true on a variant.

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