Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js boilerplate that pairs Stripe Checkout and the customer portal with Supabase auth and PostgreSQL for SaaS subscriptions.
Next.js Subscription Payments Starter is an open-source GitHub template that scaffolds a complete subscription billing application for SaaS products, connecting Next.js with Stripe Checkout, the Stripe customer portal, and Supabase authentication backed by PostgreSQL.
Next.js Subscription Payments Starter is a GitHub template from Vercel that provides a pre-built subscription billing loop: users register through Supabase auth, subscribe via Stripe Checkout, and manage their plans in the Stripe customer portal. It takes your Stripe product and price configuration as input and automatically syncs them into a Supabase PostgreSQL database via webhooks. The template was officially sunset and replaced by the newer nextjs/saas-starter repository, but it remains accessible for reference.
/api/webhooks listens for product and price events and propagates them to Supabase automatically.supabase:start, supabase:generate-types, supabase:push, and stripe:listen support a Docker-based local Supabase stack and Stripe CLI webhook testing.SaaS founders and indie hackers who need a working subscription billing flow without building authentication, payment processing, and customer portals from scratch. Developers comfortable with Stripe and Supabase who want a reference implementation for Next.js serverless billing will also find it valuable.
Deploy with the Vercel Deploy Button to clone the repo and provision a Supabase project, then create a Stripe webhook pointing to your deployment URL's /api/webhooks endpoint with a signing secret stored as STRIPE_WEBHOOK_SECRET. After redeploying with environment variables, create products and prices in Stripe; the webhook syncs them into Supabase, and the Next.js app reads them to display the checkout experience.
Yes, the template's source code is publicly available on GitHub, and you can deploy it to Vercel without purchasing the template itself. You will still need your own Stripe and Supabase accounts, which offer free tiers for testing.
Yes, it integrates Stripe Checkout for subscription payments and the Stripe Customer Portal for letting users manage their billing. Both are configured via environment variables and webhooks as described in the README.
It uses PostgreSQL, provided through Supabase. The repository includes SQL migration files that set up the initial schema, and it supports a local Supabase instance via Docker using pnpm commands.
The maintainers replaced it with the nextjs/saas-starter template. The new template builds on the same ideas but offers an updated structure, so the old subscription-payments repo is no longer actively maintained.
You can clone the repository and run it locally with pnpm, but you will still need Supabase and Stripe credentials. The README documents local development using a Docker-based Supabase instance and the Stripe CLI for webhook testing.
