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.
What is the Next.js Subscription Payments Starter?
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.
Key Features
- Supabase authentication — Full user sign-up, login, and session management powered by Supabase Auth, with optional GitHub OAuth configured through a Supabase guide.
- PostgreSQL data layer — Supabase provides the database, with SQL migrations included in the repo to create initial tables and seed data.
- Stripe Checkout integration — Accept one-time payments and subscriptions with Stripe Checkout, supporting predefined amount pricing at specific intervals.
- Customer portal — Stripe's hosted customer portal lets users update payment methods, change plans, and cancel subscriptions; the template wires it up to your account.
- Webhook-synced pricing — A Stripe webhook endpoint at
/api/webhookslistens for product and price events and propagates them to Supabase automatically. - Vercel Deploy Button — One-click deployment creates a new GitHub repo, sets up a Supabase project, and runs the SQL migrations via the Supabase Vercel Integration.
- Local development scripts — pnpm commands like
supabase:start,supabase:generate-types,supabase:push, andstripe:listensupport a Docker-based local Supabase stack and Stripe CLI webhook testing. - Production readiness guidance — The README explains how to archive test products, switch to Stripe live mode, and redeploy with production environment variables.
Who is it for?
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.
What can you do with it?
- Launch a subscription MVP: Deploy the template, define a few Stripe products like Hobby and Freelancer with monthly and yearly prices, and start taking real test payments in less than an hour.
- Sell software with tiered plans: Create multiple Stripe products with different price points, and watch the webhook populate the Supabase database for use in your app logic.
- Test billing flows end-to-end: Use the Stripe CLI to forward webhooks locally and the included fixtures file to bootstrap test products, then verify the customer portal actions.
- Learn the Stripe x Supabase architecture: Study the architecture diagram and codebase to see how Vercel serverless functions, Stripe webhooks, and Supabase Row Level Security fit together.
How does the template work?
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.
FAQ
Is the Next.js Subscription Payments Starter free?
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.
Does this template support Stripe Checkout and the customer portal?
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.
What database does the template use?
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.
Why was this repository sunset?
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.
Can I use the template without a Vercel deployment?
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.








