Billing Doctor for Next.js — Stripe Billing Template + Webhook Debug
Limited-time launch discount: use code TOMATO69 for $20 off.
"Payment succeeded, but my app is still FREE."
webhook issues without guessing.
WHAT YOU GET
- Stripe Billing Portal (cancel, upgrade, update card)
- Node.js runtime (not Edge)
- Webhook idempotency via event.id (handles Stripe retries/duplicates)
- Entitlement sync: FREE <-> PRO based on subscription status
- npm run doctor / npm run doctor:live to diagnose env + common pitfalls
- npm run stripe:listen to forward webhooks (writes whsec_... to .env.local)
- Docs (EN/JA): README, FAQ, Integration Guide, docs map
THE DEBUGGING ADVANTAGE
Most templates give you code. This one shows you what is happening.
SUCCESS CRITERIA (PROOF IT WORKS)
If you see:
- Webhook debug shows "processed" events
it works.
Demo auth (cookie userId) and demo file store are included for local testing only.
Replace both with your real auth and DB for production.
- Your own Stripe account (free to create)
- Node.js v20+
- Comfort with .env.local and terminal commands
- Stripe CLI (for local webhook testing)
NOT FOR YOU IF...
- You want a complete SaaS starter with auth/DB/admin/onboarding
- You expect hands-on support or live troubleshooting
- You want to deploy without reading docs
POLICIES (PLEASE READ)
Self-serve only: there is no support channel (no email/DM).
No refunds: digital download, all sales final, except where required by law.
Not affiliated with Stripe, Inc. You use your own Stripe account and keys.
LICENSE (INCLUDED IN THE DOWNLOAD)
You may use, modify, and deploy this code in your own projects.
You may NOT resell or redistribute it as a template/starter/kit.
Full terms are included in LICENSE.md inside the downloaded ZIP.
Digital download: Next.js Stripe billing template with monthly/yearly subscription Checkout, Billing Portal, raw-body webhook signature verification, idempotent webhook handling, a /billing webhook debug UI, and doctor/setup/listen scripts.