Stack · Payments
Next.js + Stripe.
Next.js + Stripe is the canonical SaaS billing stack — server actions for checkout, webhooks for subscription state.
CategoryPayments
Best forSaaS billing
Why together · 01
Why this combo works.
Server actions handle the secret-key flows; Stripe Webhooks update your DB; Stripe customer portal handles cancellation, plan changes, invoice history.
Setup
Install stripe, set up a /api/stripe/webhook route, and use Stripe customer portal for self-service.
Gotchas
- Webhooks must verify the signing secret — never trust the body
- Use Stripe Test Mode + a real account for development
- Tax handling needs Stripe Tax (or use Paddle as MoR)
- Webhook delivery is at-least-once — make handlers idempotent
Building this stack?
We've shipped it.
We use this on every SaaS billing engagement. If you're going to ship on this stack, brief us. We can save you a few weeks of gotchas.
Brief us