Chargebee

chargebee.com

ALMOST

A weekend of work, and real gaps remain.

Subscription billing on top of a payment processor: plans, proration, trials, coupons, dunning and revenue reporting, for businesses whose pricing is more complicated than one plan.

Promptfree, for everyone, and the only version there is
Build the subscription billing I actually need instead of Chargebee — and be honest about which half you need, because they are very different.

**One plan and a monthly charge is a webhook and a table.** Your payment processor already does plans, trials, coupons and card updates. The reason this category exists is what comes after: proration when somebody changes plan mid-cycle, and revenue reporting an accountant accepts. If your pricing is one plan, none of this applies.

STACK
- Node 20+ with Fastify
- SQLite through better-sqlite3, WAL mode
- One payment processor, hosted checkout, so no card data touches this
- Caddy in front

THE DATA MODEL
- customers: id, external_id, email, name, tax_country, tax_id, currency, created_at
- plans: id, code, name, interval, amount_cents, currency, trial_days, is_active
- subscriptions: id, customer_id, plan_id, provider_ref, status, started_at, current_period_start, current_period_end, cancel_at, cancelled_at, trial_ends_at
- subscription_changes: id, subscription_id, from_plan_id, to_plan_id, at, proration_cents, reason — append-only, and where every billing question is answered from
- invoices: id, customer_id, number, issued_on, due_on, currency, subtotal_cents, tax_cents, total_cents, status, provider_ref, pdf_path, pdf_hash
- invoice_lines: id, invoice_id, description, period_start, period_end, quantity, unit_amount_cents, tax_rate, amount_cents
- payments, refunds, credit_notes, and a per-year number sequence
- provider_events: id, event_id, kind, payload_json, processed_at — idempotency lives here
- Amounts in integer cents with a currency. Never a float

PRORATION, WHICH IS WHERE HOMEMADE BILLING GOES WRONG
- A mid-cycle change produces two lines: a credit for the unused remainder of the old plan and a charge for the remainder of the new one
- Compute both from the same day count, in whole days or in seconds — pick one and use it everywhere, or the two halves will not reconcile
- Decide what happens to the credit: applied to this invoice, or carried as a balance. Write the decision down, because a customer will ask
- A downgrade at period end rather than immediately is a different behaviour and both are legitimate. Make it a plan setting rather than a special case in the code
- Test the awkward ones deliberately: an upgrade on the last day of a month, a change during a trial, a change on the day of renewal, and a plan whose interval differs from the old one

DUNNING
- Read the decline code and act on it. Insufficient funds is worth retrying and worth timing near a payday; a stolen card is not worth retrying at all; an expired card needs the customer, not another attempt. Retrying a hard decline is how a processor decides you are a risk
- A retry schedule spread across days of the week and times of day, stopping after a stated number of attempts
- Emails alongside, at most one a day, each with a one-click link to update the card that needs no login
- A grace period during which access continues, and a clear final message before it ends

INVOICES
- Sequential with no gaps, per year, allocated inside the transaction that issues the invoice. In much of Europe this is a legal requirement rather than a preference
- An issued invoice is never edited. A mistake is voided with a reason and corrected by a credit note referencing it
- Per-line tax rates with totals broken out by rate, and the rate copied onto the line at issue
- The PDF generated once and stored with its hash

REPORTING
- Monthly recurring revenue computed from subscriptions at query time, with the definition written next to it — and the movement broken into new, expansion, contraction and churn, because the total alone tells you nothing
- Voluntary and involuntary churn reported separately. They are different problems with different fixes
- Reconcile nightly against the processor and alert on any disagreement. The local state is a mirror and must be treated as one

WHAT MATTERS MOST
Proration and the reconciliation. Write the proration tests before the code, including the month-end and trial cases, then let a subscription change plan twice in one cycle and check the invoice by hand.

What you lose

  • Proration arithmetic that is correct across upgrades, downgrades and mid-cycle changes, which is where homemade billing produces wrong invoices
  • Dunning schedules tuned against millions of failed payments
  • Revenue reporting an accountant will accept, including deferred revenue
  • Tax handling across jurisdictions, wired into the invoice rather than bolted on

If you would rather not build

  • The payment processor's own billing, which covers a single plan entirely

The escape hatch

open source · no votes, no paid placement

Kill Bill

$0

A mature open-source billing and payment platform.

killbill/killbillfree · open source

Lago

$0

Open-source metering and usage-based billing.

getlago/lagofree · open source

Why this verdict

our own opinion · changed only by a person

42/100

Verdict kinda at 42: the processor already does most of it, and what is left — proration and revenue movement — is arithmetic that is easy to get subtly wrong and expensive when you do. Build for one plan; think hard before building for many.

History

tracked since 14 Aug 2026 · nothing is ever overwritten

Interest · last 30 dayspeak 3/day
views012317 Jul22 Jul27 Jul1 Aug6 Aug11 Aug15 Aug
views prompt copies none yet votes none yet

Questions about Chargebee

answered from the record above

Is Chargebee free?

No — the plan we track is $599 a month. Performance from around $599/month billed annually above a revenue threshold; a starter tier is free up to a low monthly revenue and then charges a percentage.

Can you replace Chargebee by building your own?

ALMOST. A weekend of work, and real gaps remain. Replacement score 42 out of 100, build time a weekend. Read what you lose before you decide.

How much does Chargebee cost?

$599 a month on Performance — $7,188 a year. Recorded 14 Aug 2026.

What do you lose by replacing Chargebee?

Proration arithmetic that is correct across upgrades, downgrades and mid-cycle changes, which is where homemade billing produces wrong invoices; Dunning schedules tuned against millions of failed payments; Revenue reporting an accountant will accept, including deferred revenue; Tax handling across jurisdictions, wired into the invoice rather than bolted on. If any of those carry weight for you, keep paying.

Is there an open-source alternative to Chargebee?

Yes: Kill Bill, Lago. The prompt on this page is for when you want it your way instead.

Related entries

same category first, most replaced first

All 27 in Commerce & contracts

Not sending yet

Every week, something stops being worth paying for.

New verdicts, prices that moved, entries added. One email a week. Unsubscribe in one click. Nothing is being sent yet — your address is kept here, and the first issue is the first thing it is used for.

free forever · no tracking pixel · stored here, never passed to anyone

Esc