8.0 KiB
8.0 KiB
ListPlansList
A plan defines a set of features, pricing, and entitlements that can be attached to customers.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | Unique identifier for the plan. |
name |
str | ✔️ | Display name of the plan. |
description |
Nullable[str] | ✔️ | Optional description of the plan. |
group |
Nullable[str] | ✔️ | Group identifier for organizing related plans. Plans in the same group are mutually exclusive. |
version |
float | ✔️ | Version number of the plan. Incremented when plan configuration changes. |
add_on |
bool | ✔️ | Whether this is an add-on plan that can be attached alongside a main plan. |
auto_enable |
bool | ✔️ | If true, this plan is automatically attached when a customer is created. Used for free plans. |
price |
Nullable[models.ListPlansPrice] | ✔️ | Base recurring price for the plan. Null for free plans or usage-only plans. |
items |
List[models.ListPlansItem] | ✔️ | Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature. |
free_trial |
Optional[models.ListPlansFreeTrial] | ➖ | Free trial configuration. If set, new customers can try this plan before being charged. |
created_at |
float | ✔️ | Unix timestamp (ms) when the plan was created. |
env |
models.ListPlansEnv | ✔️ | Environment this plan belongs to ('sandbox' or 'live'). |
archived |
bool | ✔️ | Whether the plan is archived. Archived plans cannot be attached to new customers. |
base_variant_id |
Nullable[str] | ✔️ | If this is a variant, the ID of the base plan it was created from. |