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 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.
Next.js digital products
Use this starter to sell something people download, such as an ebook, a template pack or a course, at a fixed price or pay what you want. The starter uses the official Bachs SDK for checkout, product setup and webhook verification. Buyers check out as guests. A download is released only after a verified webhook and a read of the checkout from Bachs confirm the payment matches the order. See the repository’s README.This is a local development starter. Orders are stored in a local JSON file, and buyers find their orders through a browser cookie. Replace storage and email buyers their order link before deploying.
Start building
- Open the template’s 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. In the SaaS starter, confirm that access activates and Manage billing opens the right customer’s portal. In the digital products starter, confirm that the order turns paid and the download appears.
- Adapt the app to your product. Replace the demo components, run the included tests, and follow the go-live checklist on the template’s use case page.
Learn the flow
- Sell SaaS subscriptions: the objects, requests, webhook events, and access decisions in the SaaS starter.
- Sell digital products: the checkout, delivery checks and edge cases in the digital products starter.
- Use tested AI prompts: use a coding assistant to adapt subscription billing to your app.
- Live demo: try other billing models in the sandbox.

