> ## Documentation Index
> Fetch the complete documentation index at: https://docs.integrateledger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Plans and items

> Build any column of your pricing page as a plan, monthly, annual, lifetime or pay as you go, with allowances, limits, seat prices and credits, versioned safely.

Any column of your pricing page becomes a **plan**: free, paid, pay as you go, monthly, annual or lifetime, with a trial, overage and rollover when you want them. It has a price, an interval, and a list of **items**: one per feature it includes, saying how much. Credits and credit packs sit beside items, for [credits features](https://docs.integrateledger.com/pricing/credits.md).

```json ledger.catalog.json theme={"system"}
{
  "id": "pro", "name": "Pro", "priceCents": 2000, "monthlyCredits": 1000,
  "items": [
    { "featureId": "messages", "included": 500, "overageUnitAmountCents": 1 },
    { "featureId": "projects", "unlimited": true },
    { "featureId": "sso" }
  ]
}
```

"Pro, \$20 a month: 1,000 credits, 500 messages then 1 cent each, unlimited projects, SSO."

## Plan fields

| Field | What it sets |
| - | - |
| `id`, `name` | What your code attaches, and what customers see on Checkout and invoices |
| `priceCents` | The price per billing interval, in the plan's currency's minor units (cents for `usd` and `eur`); `0` for a free plan. Monthly plans also accept `monthlyPriceCents` |
| `currency`, `currencyOptions` | The plan's currency (the catalog's when omitted), and its prices in other currencies. See [Prices in other currencies](https://docs.integrateledger.com/pricing/currencies.md) |
| `billingInterval` | `month` (default), `year` ([annual](https://docs.integrateledger.com/pricing/annual.md)) or `one_off` ([lifetime](https://docs.integrateledger.com/pricing/lifetime.md)) |
| `resetInterval` | How often allowances and credits are granted again: `month` (default), `year` (annual plans only) or `never` (one-off plans only, and their default). A month counts from when the plan was attached (free plans) or from the Stripe billing period (paid plans), never the calendar month |
| `monthlyCredits` | Credits granted each allowance period, 0 or more. Required on every plan, so a plan without credits says `0` |
| `overageUnitAmountCents`, `overageBillingUnits`, `overageCapCents` | What credits cost past the balance, and the monthly cap. See [Overage](https://docs.integrateledger.com/pricing/overage.md) |
| `overageTiers`, `overageTiersMode` | Credit overage priced in `graduated` or `volume` bands instead of one rate. See [Overage tiers](https://docs.integrateledger.com/pricing/tiers.md#overage-tiers) |
| `items` | What the plan includes of each feature |
| `trial` | A free trial, with or without a card, once per customer. See [Free trials](https://docs.integrateledger.com/pricing/trials.md) |
| `versionLabel`, `draft` | A name for the version (`2026-q4`), and the plan's next terms, made but not sold. See [Plan versions](https://docs.integrateledger.com/billing/plan-versions.md) |
| `group` | The plan's product line, `default` when omitted. A customer holds one base plan per group. See [Plan groups](https://docs.integrateledger.com/pricing/plan-groups.md) |
| `addOn`, `maxQuantity` | A [recurring add-on](https://docs.integrateledger.com/pricing/add-ons.md), and how many one customer may hold |
| `licenses` | Seats of another plan this plan sells, each with its own allowances. See [Seat licenses](https://docs.integrateledger.com/pricing/seat-licenses.md) |
| `prepaid` | The credit pool priced in prepaid packs. See [Prepaid quantity](https://docs.integrateledger.com/pricing/prepaid-quantity.md) |
| `controls` | [Usage limits](https://docs.integrateledger.com/pricing/usage-limits.md) per window, [usage alerts](https://docs.integrateledger.com/pricing/usage-alerts.md), and [overage variants](https://docs.integrateledger.com/pricing/overage.md#overage-controls) (`allowed`, `freeUnits`, `billOverage`) for everyone on the plan |
| `autoTopUp` | The plan's [auto top-up](https://docs.integrateledger.com/pricing/top-ups.md) default: below a threshold, buy a pack or an amount on the saved card |
| `ignorePastDue` | Keep overage and renewal grants while a payment is [past due](https://docs.integrateledger.com/billing/renewals-and-lifecycle.md#ignore-past-due) |
| `customOnly` | Sold only as a [custom deal](https://docs.integrateledger.com/billing/custom-plans.md#plans-only-for-custom-deals), with each customer's terms at attach |
| `entityGrants` | For a plan attached to an [entity](https://docs.integrateledger.com/pricing/entity-plans.md): `own` (default) grants to the entity, `pooled` to the customer's shared pool |
| `previousIds` | IDs the plan had before a [rename](#rename-a-plan), which keep working as aliases |
| `variantOf` | The base plan this one is a [price-test variant](#test-a-price-with-a-variant) of |

## Items

| Feature type | Item | Example |
| - | - | - |
| `metered` | `included` units per period, or `unlimited: true`. Optional `overageUnitAmountCents` per `overageBillingUnits` past `included`, or `overageTiers` | `{ "featureId": "messages", "included": 500 }` |
| `held` | `included`, the most held at once, or `unlimited: true`. Optional `price` per unit held | `{ "featureId": "projects", "included": 3 }` |
| `boolean` | Just the `featureId` | `{ "featureId": "sso" }` |
| `credits` | `unlimited: true`, so uses of it spend no credits | `{ "featureId": "generate_image", "unlimited": true }` |

A metered item's `trialIncluded` is what a [trial](https://docs.integrateledger.com/pricing/trials.md) includes instead of `included`, and its `prepaid` prices units past `included` in [prepaid packs](https://docs.integrateledger.com/pricing/prepaid-quantity.md). A metered item with `included: 0` and an overage price is [pay as you go](https://docs.integrateledger.com/pricing/pay-as-you-go.md). A held item's `price` makes it a [per-seat](https://docs.integrateledger.com/pricing/per-seat.md) price, flat or [tiered](https://docs.integrateledger.com/pricing/tiers.md). A credits feature needs no item: any plan's credits pay for it.

## Free, paid and pay as you go

* **Free**: a price of `0`, no overage and no priced item. It runs entirely in Ledger, starts at once on attach, and renews monthly.
* **Paid**: a price above 0. It syncs to Stripe as a product with a price, and is bought through [Checkout or a saved card](https://docs.integrateledger.com/billing/checkout-and-attach.md).
* **Pay as you go**: a price of `0` with an overage price. It needs a card and gets a \$0 Stripe subscription that bills usage.

A plan with a price, any overage or a priced item bills through Stripe, even at \$0.

## Groups and entity plans

A customer holds one base plan in each **group**, so each product line has its own ladder: Starter for the editor beside Campaigns Pro for email, on one invoice. Plans without a `group` share the `default` group. Moving within a group is an [upgrade or downgrade](https://docs.integrateledger.com/billing/upgrades-and-downgrades.md); a plan in another group is attached beside the first. See [Plan groups](https://docs.integrateledger.com/pricing/plan-groups.md).

Each **entity** inside a customer, such as a workspace, can hold plans of its own too, with its own credits and allowances, billed on the customer's invoice. See [Plans per workspace or user](https://docs.integrateledger.com/pricing/entity-plans.md).

Extras on top of a plan are [recurring add-ons](https://docs.integrateledger.com/pricing/add-ons.md), [credit packs](https://docs.integrateledger.com/pricing/credit-packs.md) and [balance adjustments](https://docs.integrateledger.com/customers/balance-adjustments.md). Monthly and annual prices of one tier are two plans (`pro`, `pro_annual`).

## Add-ons

A plan with `addOn: true` is a **recurring add-on**: bought beside a paid base plan and billed on the same invoice, such as 10,000 extra credits for \$20 a month. A customer on a free plan, or on none, buys one on a bill of its own, which a paid plan of that interval joins later. `maxQuantity` (default `1`) is how many one customer may hold. An add-on carries `monthlyCredits` and items of any feature type, which count in check and track beside the base plan's, and renews with its bill. Changing either field publishes a new version, and `GET /v1/plans` lists both.

```json ledger.catalog.json theme={"system"}
{ "id": "extra_credits", "name": "Extra credits", "monthlyCredits": 10000,
  "priceCents": 2000, "addOn": true, "maxQuantity": 5 }
```

[Cancel a subscription item](https://docs.integrateledger.com/api-reference/customers/cancel-subscription-item.md) ends one add-on: at the period end by default, when the renewal bills the plan without it, or immediately, with no refund. [List customer subscriptions](https://docs.integrateledger.com/api-reference/customers/subscriptions.md) lists each subscription's items, and `GET /v1/customers` lists the plans the customer holds in `plans`.

[Recurring add-ons](https://docs.integrateledger.com/pricing/add-ons.md) covers attaching and cancelling one, how it bills and grants, and its rules.

## Versions

Changing a plan's price, intervals, credits, overage, items or structure (`group`, `addOn`, `maxQuantity`, `entityGrants`) publishes a new **plan version**. Customers already on the plan keep the version they started; customers who start it afterwards get the new one. Publishing the same values again changes nothing (`"changed": false`).

Each plan has one `active` version (what attach starts), at most one `draft` (its next terms, made but not sold) and `legacy` versions its subscribers keep. [Plan versions](https://docs.integrateledger.com/billing/plan-versions.md) covers drafts, promoting, rolling back and attaching an older version.

Changing only a plan's `name` publishes no version: every version takes the new name in place, and so do its Stripe Products, so subscribers' next invoices show it.

## Rename a plan

To change a plan's ID, change `id` and list the old one in `previousIds`:

```json ledger.catalog.json theme={"system"}
{ "id": "basic", "previousIds": ["starter"], "name": "Basic", "monthlyCredits": 100, "priceCents": 1900 }
```

The push renames the plan instead of archiving `starter` and making `basic`: every version, subscriber and Stripe Price stays with it. The old ID keeps working as an alias wherever a plan ID is taken (attach, upgrade, downgrade, import, overage overrides and the plan routes), and responses carry the new one. `ledger pull` writes `previousIds` back. Without the CLI, call [`POST /v1/plans/starter/rename`](https://docs.integrateledger.com/api-reference/plans/rename):

```typescript TypeScript theme={"system"}
await billing.renamePlan({ id: "starter", body: { newId: "basic" } });

// Later, to free "starter" for another plan:
await billing.deletePlanAlias({ id: "basic", alias: "starter" });
```

```python Python theme={"system"}
billing.rename_plan("starter", new_id="basic")

# Later, to free "starter" for another plan:
billing.delete_plan_alias("basic", "starter")
```

```bash cURL theme={"system"}
curl https://api.integrateledger.com/v1/plans/starter/rename \
  -H "Authorization: Bearer $LEDGER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"newId": "basic"}'
```

## Test a price with a variant

A variant is its own plan, linked to a base for an A/B price test:

```json ledger.catalog.json theme={"system"}
{ "id": "pro", "name": "Pro", "monthlyCredits": 1000, "priceCents": 2900 },
{ "id": "pro_b", "variantOf": "pro", "name": "Pro", "monthlyCredits": 1000, "priceCents": 2500 }
```

* Attach it by its ID. Your app chooses which customers see which variant.
* It has its own terms and versions: a change to the base leaves it as it is, and the diff lists the variants a base change leaves alone (`variants_keep_terms`).
* It shares the base's trial: a customer who trialled one doesn't get the other's.
* Moving between the base and a variant is an ordinary upgrade or downgrade.
* `GET /v1/plans?variantOf=pro` lists the variants (`listPlans({ variantOf: "pro" })`, `list_plans(variant_of="pro")`). Changing `variantOf` relinks a variant in place; removing it detaches it.

## Archiving

Removing a plan from your catalog file archives it: new customers stop getting it, while customers already on it keep their subscription and balances, and nothing is cancelled in Stripe. Publishing its ID again brings it back.

## Stripe sync

A plan's `stripeSyncStatus` is `pending` while the sync runs, `synced` once Stripe has its product and price, `failed`, or `null` for a free plan. Attaching a paid plan that is still syncing syncs it first, so attach works the moment you publish. [Stripe](https://docs.integrateledger.com/stripe.md) lists what Ledger creates.

## Rules

* A free plan renews monthly; annual (`billingInterval: "year"`) and lifetime (`"one_off"`) plans take a price above 0.
* Metered, held and boolean features need an item on the plan, or `check` and `track` answer `feature_not_in_plan`.
* Overage prices go on base plans; a push refuses them on an add-on (`add_on_overage_unsupported`).
* Attach sells active plans; publish an archived plan's ID again to sell it.
* If Stripe refuses the sync during attach, attach returns `502 stripe_checkout_failed`.
* A new plan takes an ID that is no other plan's alias (`409 plan_id_is_alias`). Drop an alias with [`DELETE /v1/plans/{id}/aliases/{alias}`](https://docs.integrateledger.com/api-reference/plans/delete-alias) to free it.
* A variant's base is an active plan that is not itself a variant, and a plan with variants stays a base (`400 invalid_variant`).

## Next steps

> [card] [Customers and subscriptions](https://docs.integrateledger.com/concepts/customers-and-subscriptions.md)
>
> What attaching a plan creates.

> [card] [Choose a model](https://docs.integrateledger.com/pricing/choose-a-model.md)
>
> One page per pricing pattern, each with its catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.