Stripe billing, wired in and safe to retry.

Organisations subscribe in Stripe Checkout and manage their plan in the Customer Portal. Stripe's webhook is the only thing that writes subscription state, so no request from the browser can set a plan.

Your app + Stripe
Checkout
Stripe Checkout for the paid plans
Self-serve
Card, plan and cancellation in the Customer Portal
Webhook
Eight events, each applied once
Without keys
Billing stays off; the rest of the app works

See it work

Stripe billing

Plans defined once and paid through Stripe, and only Stripe can change a subscription.

What you get

Billing you don't have to babysit.

Plans, trials and entitlements are defined once in billing.ts and read by both the API and the web app. The Stripe price decides what is charged.

  • Checkout and the portal, already wired

    Organisations subscribe through Stripe Checkout and change their card or plan, or cancel, in the Customer Portal.

  • One writer of subscription state

    Each event is verified, recorded once and applied in one transaction, so a redelivered event changes nothing and a late older one can't roll a subscription back.

  • Invoices that pay affiliates and score tests

    Paid invoices drive affiliate commissions and bandit tests that reward revenue. Affiliate coupon codes are Stripe promotion codes.

Try it in the demo

See billing from both sides.

Sign in to the demo to see subscriptions as the webhook wrote them.

The demo is a shared read-only account: you can open every screen, but nothing saves.

  1. Step 01

    Open the pricing page

    The plans and trial come from billing.ts, the same file the server reads.

  2. Step 02

    Open the demo

    On the sign-in page, choose Open the demo. You land in the app as a read-only admin.

  3. Step 03

    Open Admin → Subscriptions

    Every organisation's plan and status, exactly as Stripe's webhook recorded them.

  4. Step 04

    Check the setup list

    Admin → Setup says whether the Stripe keys are set, in test or live mode, and whether a webhook has arrived.

No. Without the Stripe keys, billing stays off, every organisation is on Free and the billing page says so. Accounts, teams and the rest of the app work as normal.

Nothing changes. Every event is verified against its signature and recorded once, and applied in one transaction, so a redelivered event is ignored.

Yes. Create the new price in Stripe and put its id first in the plan's price variable, with the old one after a comma, so existing subscribers keep theirs. Then update the label in billing.ts.

Ready to build your product on the starter?

Get in touch