Available templates
Next.js SaaS
Use this starter for a product that charges for ongoing access, such as a software tool or a membership app. The starter uses the official Bachs SDK for checkout, product setup, customer portal sessions, and webhook verification. It saves subscription state and grants access after a verified webhook. A success redirect cannot grant access. You need Node.js 22 or later, a sandbox API key, and the Bachs CLI. See the repository’s README for setup and SDK package instructions.This is a local development starter. Every visitor shares a demo user, and billing data is stored in a local JSON file. Replace authentication and storage before deploying. Add your product’s features and choose its access policy.
Start building
- Open the template repository and select Use this template to create your own copy.
- Follow its README to configure sandbox products, start the webhook listener, and run the app. Authenticate the CLI to the same sandbox account as the app.
- Complete a sandbox checkout. Confirm that the webhook saves the subscription, access activates, and Manage billing opens the correct customer’s portal.
- Adapt the app to your product. Replace the demo components, run the included tests, and follow the go-live checklist.
Learn the flow
- SaaS subscriptions: understand the objects, requests, webhook events, and access decisions used in this template.
- Skills and prompts: use a coding assistant to adapt subscription billing to your app.
- Live demo: try other billing models in the sandbox.

