A man by a tall window over the city

Billing

Organisations subscribe to Free, Pro or Team through Stripe Checkout. Plans and their limits are defined once in the contracts package, the webhook is the only thing that writes subscription state, and the server reads a plan's limits itself.

Two people pointing at a laptop screen

What's included

Pro and Team start with a 14-day free trial on an organisation's first subscription. Upgrades, downgrades, card changes and cancellations happen in Stripe's customer portal.

Billing stays off, and the billing page says so, until STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET are set, so the rest of the app works without Stripe.

  • Stripe Checkout for the paid plans
  • Customer portal for plan changes
  • Webhook events applied once each
  • Entitlements read on the server
  • Refunds and chargebacks passed to listeners

How it works

The webhook handles eight events, from checkout.session.completed to charge.dispute.closed, and records each event id so a retried delivery never applies twice.

Server code asks billing.entitlements(organizationId) for seats, projects and features instead of trusting anything the browser sends.

  1. Create a recurring Stripe price for each paid plan
  2. Set the Stripe keys and the price ids
  3. Forward the webhook with the Stripe CLI
  4. Subscribe with a test card and check the plan
A woman pinning shapes to a glass wall

Let's Talk

Get in touch