Skip to navigation

Plans

A plan is a named set of prices and rate cards sold together, such as “Base” and “Pro”. You rank plans on an upgrade path, create an order from a plan in one step, and move a customer to another plan with one amendment. A plan only references prices and rate cards, never copies them, so a plan, the orders built from it and your catalog can’t drift apart.

Use a plan to:

  • Offer self-serve packages that customers choose between, ranked on an upgrade path.
  • Create orders in one step by sending plan instead of lines when you create an order.
  • Move customers up or down with a changePlan amendment, previewed with its exact cost.

Sales-led businesses can skip plans and put prices on orders directly.

Plans are in the plans=v1 private beta: send Paid-Beta: plans=v1 with each request.

How a plan works

  1. Lines reference your catalog. Each line is a price, with an optional default quantity, or a rate card. Lines can come from several products.
  2. An upgrade path ranks plans. Plans in the same group are ordered by position, 1 lowest.
  3. An order built from a plan gets ordinary lines. Paid adds the plan’s lines to the order and records the plan and its version.
  4. A plan change swaps the plan’s lines. Lines on both plans keep running; the rest end or start.

Create a plan

Lucerne sells a chat app on monthly plans. Its Base plan charges $8.00 a month through a recurring price, prc_2Tg7Mx, and charges for output tokens through a usage price, prc_8Lw4Tz. Both prices already exist on its chat app product.

Create a plan with its lines and its place on the upgrade path:

{
"externalId": "base_monthly",
"name": "Base",
"description": "Chat with everyday models, billed monthly.",
"displayName": "Lucerne Base",
"lines": [
{ "type": "price", "price": { "price": "prc_2Tg7Mx" } },
{ "type": "price", "price": { "price": "prc_8Lw4Tz" } }
],
"upgradePath": { "group": "lucerne_monthly", "position": 1 },
"default": true
}

Every line must be active, and the lines must share at least one currency. The response adds what Paid works out from the lines:

FieldWhat it tells you
productsThe products the plan’s lines belong to.
currenciesThe currencies every line is offered in. An order from the plan must be in one of them.
versionGoes up by one each time lines change. Orders record the version they were built from.
legacySet only on a plan converted from the legacy API that couldn’t be mapped to v1 prices. Such a plan can’t be used on v1 orders.

Quantities and labels

A price line’s quantity is the default for a price with a unit, such as 5 seats, within the price’s quantity limits. An order can change it. Leave it out for a flat fee or a usage price.

displayName is used only when the plan has exactly one recurring price, as Base does: that line prints “Lucerne Base” on invoices, unless the order line has its own label. With several recurring prices, each line keeps its price’s label, so the plan’s name isn’t printed twice. Usage and rate card lines always keep their own label.

Rank plans on an upgrade path

upgradePath places a plan in a group at a position, starting at 1. Positions are unique within a group. Lucerne creates its Pro plan, $20.00 a month through prc_5Vb3Nk with the same output token price, in the same group at position 2:

POST /v1/plans
{
"externalId": "pro_monthly",
"name": "Pro",
"displayName": "Lucerne Pro",
"lines": [
{ "type": "price", "price": { "price": "prc_5Vb3Nk" } },
{ "type": "price", "price": { "price": "prc_8Lw4Tz" } }
],
"upgradePath": { "group": "lucerne_monthly", "position": 2 }
}

default: true marks the plan offered first in its group, such as the one preselected in checkout. It needs an upgradePath, and replaces the group’s previous default. Use separate groups for separate ladders, such as monthly and annual plans.

List plans with group=lucerne_monthly to get them in order of position.

Sell a plan

Create an order with plan instead of lines:

POST /v1/orders
{
"customer": "cus_3Mt8Qe",
"startsAt": "2026-11-01T00:00:00Z",
"plan": { "plan": "base_monthly" }
}

Paid adds the plan’s lines to the order and records plan and version on it. plan.quantities replaces a line’s default quantity, keyed by price. Any lines you send as well are added beside the plan’s, and a plan change never touches them.

Change a customer’s plan

Preview an amendment with a changePlan change. It ends every line that came from the current plan and adds the new plan’s lines:

POST /v1/orders/ord_7Rw2Kd/amendments/preview
{
"expectedVersion": 1,
"changes": [
{ "type": "changePlan", "changePlan": { "plan": "pro_monthly" } }
],
"proration": "prorate"
}
  • A price or rate card on both plans keeps its line, so its usage and seats are untouched.
  • quantities sets the new lines’ quantities, keyed by price. With carryQuantities, true by default, a new line whose price has the same unit as an ended one, such as seats, keeps its quantity.
  • The preview’s direction says whether the move is an upgrade, downgrade or lateral, from the plans’ positions. Plans on different upgrade paths are lateral.

The change takes effect when you apply the preview. Usage before then bills at the old plan’s prices, and usage after it at the new plan’s.

How it bills

A Lucerne subscriber on Base, billed monthly from 1 November, upgrades to Pro on 16 November. November has 30 days, and 16 to 30 November is 15 days including the day of the change. With proration: "prorate", the fixed fees are credited and charged by day:

StepValue
Days left in the period15 of 30
Base fee credited−800¢ × 15 ÷ 30 = −400¢
Pro fee charged2,000¢ × 15 ÷ 30 = 1,000¢
Net proration1,000¢ − 400¢ = 600¢
Previewdirection: "upgrade", net +$6.00
Output token priceOn both plans, so its line keeps running: November’s tokens are billed once, on one line

From December, the subscriber’s invoice shows “Lucerne Pro” at $20.00 a month.

Change or archive a plan

Update a plan with only the fields to change. A change to lines creates a new version; a change to displayName applies to invoices issued afterwards.

Archive a plan to stop selling it. It can’t be put on new orders or chosen in a plan change, and running orders keep their lines. An archived plan can’t be restored: create a new one instead.

A price can’t be archived while an active plan lists it. Update the plan first.