SaaS · Business · Guides

SaaS subscription billing basics: plans, trials, renewals and failed payments.

A plain guide to subscription billing for a SaaS: plans and limits, trials, renewals, failed payments, upgrades, proration.

Key takeaways

  • Billing is a state machine: trial, active, past due, cancelled. Model the states explicitly.
  • Keep plans and limits in data, not in code, so you can change them without a release.
  • Plan for failed payments from day one. They are normal, not exceptional.
  • Tax and invoice rules depend on your country and business, so confirm them with an accountant.

What a subscription system must do

At minimum, it must answer four questions at any time: what plan is this customer on, until when is it paid, what are they allowed to use, and what happens if payment fails.

Plans and limits as data

Avoid if ($plan == 'pro') scattered through code. Store plans in tables with prices and limits, and check features or limits:

if (! $tenant->hasFeature('lab_module')) {
    abort(403);
}

That way, adding a new plan or changing a limit is a data change. I discuss module-based plans in how to price a SaaS by modules.

The subscription states

A simple, useful set:

  • Trialing: free access until a date.
  • Active: paid until the current period ends.
  • Past due: renewal failed. Access continues for a grace period.
  • Suspended or expired: access limited or removed.
  • Cancelled: will not renew. Often valid until period end.

Store the period start and end dates, and compute access from them, rather than from a single "active" flag.

Trials

Decide whether a card is required to start. Trials without a card convert fewer but bring more sign-ups. Whichever you pick, send reminders before the trial ends, and make clear what happens next.

Renewals and failed payments

Cards fail for ordinary reasons: expiry, limits, bank checks. For recurring billing in India there are rules, such as customer authorisation for recurring mandates, so check your payment provider's current documentation.

A common approach for failures:

  1. Retry on a schedule.
  2. Email the customer each time with a link to update payment details.
  3. Keep access through a short grace period.
  4. Suspend, rather than delete, if payment is still missing.
  5. Reactivate immediately when payment succeeds.

Upgrades, downgrades and proration

When a customer upgrades mid-period, you can charge the difference for the remaining time (proration) or start the new plan at the next renewal. Downgrades are usually simpler if applied at renewal. Choose one policy and explain it on the pricing page.

Invoices

Generate an invoice for each payment with a unique sequential number, customer details, the amount and the tax shown as required. Do not edit issued invoices. Issue a credit note instead. Check your local GST or tax rules with an accountant, because this guide is not tax advice.

Data model sketch

  • plans: name, price, interval, limits
  • subscriptions: tenant, plan, status, period start, period end, trial end
  • payments: subscription, provider id, amount, status
  • invoices: number, payment, amount, tax details

Keep provider ids, such as the payment id, so you can reconcile.

Operations you will need

  • A manual way to extend a subscription or give credit.
  • A log of billing events.
  • Alerts when webhooks fail.
  • An export for your accountant.

Frequently asked questions

Should I build billing myself?

Building the entitlement logic is your job anyway. You can lean on a provider for payment collection and recurring charges.

Monthly or yearly plans?

Offer both if your customers want it. Yearly plans improve cash flow but need clear refund rules.

What about refunds?

Write a refund policy, show it before payment, and record every refund in your system.

See the plans, tenants and billing structure behind my hospital SaaS.

See the hospital SaaS