Concepts

Subscriptions

Follow a subscription through its statuses and terms, select one of the two endpoints that change items, and estimate every money-moving call before you run it.

A subscription holds many items: one line per price, each with a quantity. A plan, three add-ons and a metered line share one renewal date and one invoice.

Once you create it, the billing clock owns it. Renewal, invoice generation, collection and dunning happen without further calls from you.

Statuses

StatusWhat it means
futureYou gave it a start date that has not arrived.
in_trialIt is in its trial period. tmbilling charges nothing yet.
activeIt is billing normally.
non_renewingIt runs to the end of the current term, then stops. You get this from "cancel at period end", and a subscription that runs out of billing cycles reaches it on its own.
pausedtmbilling does not bill it while paused.
cancelledTerminal.
A failed payment belongs to the invoice, not the subscription. The invoice moves to payment_due and dunning starts, while the subscription can stay active throughout.You configure what happens when the retries run out — it may cancel, and it may not. The subscription carries counters for what is owed rather than a status that conflates money with access. See Failed payments and dunning.

Terms

A subscription has a current term: the period you bill it for. At the end of each term tmbilling rolls it forward and raises the invoice for the period just begun.

Recurring lines bill in advance. Usage bills in arrears, for the period that just closed.

FieldTypeWhat it does
trial_daysintegerStarts the subscription in_trial. tmbilling makes the first charge when the trial ends.
start_dateISO-8601Backdates or future-dates the period start. A future date gives you a future subscription.
billing_anchorISO-8601Fixes the first period end, so you can align a subscription to a calendar billing date instead of its signup date.
remaining_billing_cyclesintegerSets a fixed number of renewals. At zero the subscription becomes non_renewing rather than cancelled, which matters to your customer's access.
POST/v1/businesses/{biz}/subscriptions/{sub}/change_term_end

Moves the current term's end boundary, when you need the next invoice on a specific day.

Change the items

Two endpoints change items, and picking the wrong one is the usual mistake:

EndpointYou sendtmbilling does
POST /subscriptions/{sub}/changea deltaApplies your additions, removals and quantity changes, and leaves everything you don't mention alone.
POST /subscriptions/{sub}/update_for_itemsthe complete item listMakes the subscription match your list, removing anything absent from it.

Both prorate immediately. tmbilling credits the unused portion of what you removed, charges the new item pro rata, and writes both as invoice lines and ledger entries.

See Upgrades and downgrades.

Estimate before you charge

Every money-moving call has a dry run that returns the real numbers and moves nothing:

EstimateTells you
POST /customers/{cus}/subscription_estimateWhat the first invoice will be
POST /subscriptions/{sub}/estimateWhat a change, addition or removal will cost
POST /subscriptions/{sub}/cancel_estimateWhat cancelling does to the money
POST /subscriptions/{sub}/reactivate_estimateWhat reactivating will invoice
GET /subscriptions/{sub}/renewal_estimateThe next renewal amount

Show one to your customer before you charge them.

Schedule a change instead of applying it

Anything dated can wait:

POST/v1/businesses/{biz}/subscriptions/{sub}/schedule

Schedules a future-dated cancel, pause, resume or change.

A pending schedule is a real object. List it, show it to your customer, and withdraw it if they change their mind:

GET/v1/businesses/{biz}/subscriptions/{sub}/scheduled_changes
DELETE/v1/businesses/{biz}/scheduled_changes/{sch}

Cancel, pause and resume

Each of these takes a full option set rather than a single boolean, because each raises the same questions: what happens to unbilled charges, to the outstanding balance and to refundable credit, and what reason to record.

POST/v1/businesses/{biz}/subscriptions/{sub}/cancel
POST/v1/businesses/{biz}/subscriptions/{sub}/pause
POST/v1/businesses/{biz}/subscriptions/{sub}/resume
POST/v1/businesses/{biz}/subscriptions/{sub}/reactivate

A resume inside the paid term keeps that term and charges nothing. A resume after it ends starts a new term at the resume and always bills it: charges_handling is invoice_immediately or add_to_unbilled_charges, and an omitted value takes the business's pause_config.charges_on_resume (default invoice_immediately. next_renewal is a deprecated alias of add_to_unbilled_charges.). API, portal and scheduled resumes follow the same rule.

reactivate both clears a pending cancellation and restarts a subscription that already ended. Run the estimate to see which one you are about to pay for.

Add a mid-cycle charge

POST/v1/businesses/{biz}/subscriptions/{sub}/charges

Adds a one-off charge. Invoice it immediately, or fold it into the next renewal.

Deferred charges wait as unbilled charges until tmbilling sweeps them into the next invoice:

GET/v1/businesses/{biz}/subscriptions/{sub}/unbilled_charges
Copyright © 2026