Creates a new plan with optional base price and feature configurations.
Use this to programmatically create pricing plans. See How plans work for concepts.
items array configures a single feature. There are two types:
Consumable features (API calls, messages, credits):
included for free units that reset each periodreset.interval to define when balance resets to includedprice for usage beyond included amountincluded for the base allocationreset - usage persists across billing cyclesbilling_method: "prepaid" for upfront payment per unitBearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the plan to create.
1Display name of the plan.
1Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
Optional description of the plan.
If true, this plan can be attached alongside other plans. Otherwise, attaching replaces existing plans in the same group.
If true, plan is automatically attached when a customer is created. Use for free tiers.
Base recurring price for the plan. Omit for free or usage-only plans.
Feature configurations for this plan. Each item defines included units, pricing, and reset behavior.
Free trial configuration. Customers can try this plan before being charged.
OK
A plan defines a set of features, pricing, and entitlements that can be attached to customers.
Unique identifier for the plan.
Display name of the plan.
Optional description of the plan.
Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
Version number of the plan. Incremented when plan configuration changes.
Whether this is an add-on plan that can be attached alongside a main plan.
If true, this plan is automatically attached when a customer is created. Used for free plans.
Base recurring price for the plan. Null for free plans or usage-only plans.
Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
Unix timestamp (ms) when the plan was created.
Environment this plan belongs to ('sandbox' or 'live').
sandbox, live Whether the plan is archived. Archived plans cannot be attached to new customers.
If this is a variant, the ID of the base plan it was created from.
Free trial configuration. If set, new customers can try this plan before being charged.