Introduction
Welcome to Pay4SaaS (Pay-For-SaaS) — a payment and consumption system built on Next.js. From checkout to membership access control and credit deduction, everything is handled.
Just tweak the config and a bit of code, run SQL, and swap in your own product — you'll have a SaaS site with 4 pricing models, multiple payment methods, and bilingual support.
What You Get
-
4 pricing models — Credits, unlimited subscription, quota subscription, and lifetime — switch the environment variable and configure the corresponding payment products
-
11 database tables — Users, subscriptions, credits, webhooks, and more, with indexes and RLS security policies
-
Stripe, Creem, and PayPal — just configure, no extra code, with webhook handling + signature verification. China Alipay also available
-
Full consumption layer — Access control, credit deduction, and quota management, with frontend Hooks + backend APIs
-
Landing page + blog + user dashboard — All included
-
Bilingual + multi-currency — Auto-switching
-
Continuous updates — Pushed via GitHub repo
Scope of This Documentation
This documentation covers the configuration, deployment, and usage of Pay4SaaS. For underlying technologies (Next.js, Supabase, Stripe, etc.), we provide links to their official documentation rather than duplicating their guides.
This documentation assumes you are familiar with the basics of Next.js, React, and TypeScript.
Tech Stack
- Next.js 16 + React 19 — App Router
- TypeScript — Type safety
- Tailwind CSS — Styling
- Supabase — Database and authentication
- Fumadocs — Documentation system
Getting Help
- Browse the sidebar navigation
- Email:
- WeChat:
novNuyoah - Twitter/X: @taoWithSaaS
Next Steps
- Get Supabase Database Configuration
- Configure login methods: Email & Password / Google OAuth / GitHub OAuth
- Choose a Pricing Model → Configure payment providers (Stripe / PayPal / Creem / Alipay)
- Access Control → Credits Consumption
Docs home
Return to the full implementation guide.
Pricing
Review subscriptions, credits, and lifetime options.
Blog
Read more notes on SaaS payments and growth.