Prerequisites
- A Kerne app
- A Stripe account
- Your app already configured with authentication - see Authentication setup
1. Connect a payment provider
In the Kerne dashboard: Settings → Billing → Connect Stripe, then complete the OAuth flow. Use test mode during development.Other providers may come sooner or later, and Stripe is the only one supported for now.
2. Create a product and plan
This is a dashboard action, not an SDK call - catalog configuration (products, plans, prices) is control-plane: it’s you configuring your own SaaS, not something your running app does. In the dashboard: Billing → Products → create a product → add a plan with pricing.3. Display pricing
kerne.billing.plans() is the one catalog read exposed to your app - public, meant for a pricing page:
price.interval is {count}{unit} (unit is D, M, or Y - e.g. "1M", "3M", "1Y"), not a word - never render it directly to an end user. Written out by hand below; @kerne/react/ui exports the same formatInterval() (and formatMoney()) if you’re already pulling in that package:
4. Implement checkout
5. Handle success
The subscription is created once the provider confirms payment (asynchronously - not necessarily the instant the browser lands back on your app after checkout):6. Provide a billing portal
Next steps
- Gating features to gate on what a customer bought
- Design pricing for best practices

