Pro, plus 10,000 extra credits for $20 a month.Grow revenue from customers you already have: sell extra credits, a bigger allowance, a higher limit or a feature such as SSO that renews with their plan, on the bill they already pay. A recurring add-on is a plan with
addOn: true. Beside a paid base plan, it goes on the customer’s existing Stripe bill: attaching it charges a prorated amount for the rest of the period, and from the next renewal the one invoice carries the plan and the add-on. A customer on a free plan, or on none, can buy it too: it starts a bill of its own, which their paid plan joins later. Its credits and allowances are granted when that invoice is paid, and again at each renewal. Its features count in check and track beside the plan’s from then on.
Add-ons or credit packs. An add-on recurs every period until the plan ends. A credit pack is bought once, through Checkout, and its credits never expire.
The catalog
An add-on is published, synced to Stripe and versioned like any plan, and
GET /v1/plans lists it with addOn and maxQuantity.
Attach it
Attach the add-on with itsplanId and an Idempotency-Key header, as for an upgrade. Save the key when the customer confirms, and send it again on a retry: the same key answers the same change, and charges once. quantity is how many to add on top of any the customer holds, 1 by default.
Response
Attaching the same add-on again raises its quantity, up to
maxQuantity.
How it bills and grants
- One bill. The add-on is an item on the customer’s existing Stripe subscription, not a second subscription. Attaching it charges one invoice at once, to the saved card.
- Prorated now. That invoice charges the add-on’s price for the unused share of the current period. A raise in quantity charges only for the units added.
- Granted when paid. Once the invoice is paid, Ledger grants the added units’ credits and allowances, times the unused share of the period, rounded down. Halfway through the month, Extra credits charges about $10 and grants 5,000 credits.
- Full at renewal. Each renewal invoice bills the plan and the add-on together, and grants the add-on’s credits and allowances in full, per unit held, beside the plan’s.
- Unpaid renewals. If a renewal isn’t paid, the add-on’s grants for that period end with the plan’s, and come back if it’s paid later. A refund or dispute of an add-on’s invoice is recorded on the customer, as a plan’s is.
Sell an add-on before a paid plan
A customer on your free plan, or on no plan, can buy an add-on straight away: SSO for the free tier, or extra credits before they commit to Pro. With no paid plan billed at the add-on’s interval, the attach starts a bill of its own holding only the add-on, paid as a first paid plan is:- Granted in full. The bill’s first invoice bills the add-on alone and grants its whole period, then each renewal bills and grants it again. A free plan the customer holds stays beside it and renews on its own.
- The paid plan joins it. A paid plan billed at the bill’s interval, attached later with an
Idempotency-Key, becomes that bill’s base plan, so the customer keeps one invoice. It’s a prorated change on the bill, answered like an add-on attach ({ itemChangeId, status, paymentUrl, item }). Once it’s paid, the plan’s credits and metered allowances are granted for the rest of the period, prorated, and the customer’s free plan in the plan’s group closes. From the next renewal one invoice bills the plan and its add-ons. A plan priced per seat joins with its seats. - Another interval, another bill. A paid plan billed at another interval starts its own bill, as an annual plan beside a monthly add-on does.
- Listed like any bill. List customer subscriptions shows it with
planId: nulland its items, and itssubscription.*webhooks carry a nullplanId. - It ends with its last add-on. Cancelling the bill’s last add-on ends the bill.
How it counts in check and track
check, track and reservations read the customer’s plan and every add-on they hold together:
- Booleans. A feature is on when the plan or any add-on has it. Sell SSO as an add-on, and
checkonssoturns allowed once it’s paid. - Allowances and limits add up. Each add-on’s
includedcounts times its quantity, on top of the plan’s. With 3 projects on Pro, a Projects add-on of 5 lifts the limit to 8, and 13 at quantity 2. - New features. An add-on can bring a metered or held feature the plan doesn’t have;
trackspends the add-on’s grant. - Unlimited wins. An unlimited item on the plan or an add-on makes the feature unlimited.
- Overage stays the plan’s. Usage past the combined allowance bills at the base plan’s overage terms.
Show what the customer holds
Your billing page reads every add-on the customer holds from the calls it already makes:GET /v1/customerslistsplans: the base plan (kind: "plan") and each recurring add-on (kind: "add_on"), with itsgroup,quantityandstatus(active, orcancelinguntil the period end). Each feature listssources: the plan and add-ons it comes from, each with itsplanId,kindandincluded.- List customer subscriptions gives each subscription its
items, oldest first, withid,planId,kind,group,quantity,statusandendsAt(set while it’scanceling). An item’sidis what cancelling takes.
Cancel an add-on
Let customers drop an add-on on their own, while their plan carries on. Cancel a subscription item ends one add-on, at the period end by default or now:Response
- At the period end (
timing: "period_end", the default): the item turnscanceling, its features and credits last untilendsAt, and the renewal bills the plan without it. The subscription’s discounts carry on to the renewal. - Now (
timing: "immediately"): the item ends at once, with its credits and features, and Stripe stops billing it. Nothing is refunded or credited. - Safe to retry. The same
Idempotency-Keyanswers the same cancellation, and cancelling an add-on alreadycancelingreturns that cancellation.
Change the base plan
Customers holding add-ons upgrade and downgrade their base plan as usual: the add-ons stay on the bill with their grants and discounts, and only the base plan is prorated. See With add-ons.When the plan ends
An add-on runs as long as the bill it’s on. When the plan ends, by cancelling now, at the end of the period, or when Stripe’s retries give up, the add-on ends with it: its credits and allowances end with the plan’s, and its features stop counting in check and track. While the plan is set to cancel at the period end, the add-on runs to that end.Rules
- An add-on bills at its interval. It joins the customer’s paid bill billed at that interval, a monthly add-on beside a monthly plan and a yearly one beside an annual plan, or starts its own bill when there’s none.
- One bill per add-on. More of an add-on the customer holds goes on the bill that holds it (
409 add_on_needs_paid_bill). - One purchase at a time. While another Checkout or a new add-on bill is being paid for, the attach waits for it (
409 purchase_pending). - Add-ons are the customer’s. An attach with
entityIdis refused (400 invalid_request). - A base plan joins an add-on bill that has none. A bill with a base plan, or a customer holding a paid plan, trial or lifetime plan in the plan’s group, answers
409 subscription_exists; a plan with seat licenses answers400 license_attach_unavailable. - A ready card for a change on a bill. The customer has a saved card in Stripe, a zero Stripe balance and no pending invoice items (
400 ineligible_stripe_adjustment). - A yearly add-on resets yearly. One that bills yearly and resets monthly is refused at attach (
400 add_on_attach_unavailable); setresetInterval: "year". - Overage lives on the base plan. An add-on’s credits and items carry no overage prices (
add_on_overage_unsupported). - It recurs. An add-on bills each month or year; a push refuses
billingInterval: "one_off"(add_on_must_recur). Sell a one-time purchase as a credit pack. maxQuantityis for add-ons. A push refuses it on a base plan (max_quantity_add_ons_only), and a base plan attach takes onlyquantity: 1.- Up to
maxQuantity. An attach that would take the customer past it is refused (409 add_on_limit_reached). - One change at a time. While an add-on change waits for payment, the bill takes no upgrade, downgrade or other add-on change, and while an add-on is canceling at the period end, it takes an upgrade only (
409 subscription_change_pending). - Cancelling is for add-ons. The base plan’s item is cancelled with Stop or resume renewal (
400 item_not_cancellable), and a bill with a downgrade scheduled takes an item cancellation once the downgrade is cancelled (409 downgrade_scheduled). - Attach an add-on without a promotion code. It bills on the existing bill rather than through Checkout, so
promotionCodereturns400 invalid_requestandallowPromotionCodeshas no effect. - Add-ons are attached, never upgraded or downgraded to (
400 add_on_attach_unavailable). - A base plan with seats, licenses or prepaid units moves on a bill without add-ons (
400 ineligible_stripe_subscription).
Errors
Every attach error is in Errors.
Related
- Credit packs: extra credits bought once.
- Plans and items: every plan field.
- Upgrades and downgrades: moving between base plans.