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.
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.
- Create a recurring Stripe price for each paid plan
- Set the Stripe keys and the price ids
- Forward the webhook with the Stripe CLI
- Subscribe with a test card and check the plan



