Skip to main content
Start a new app with a working Bachs integration. Choose a template for your framework and the payment flow your product needs, then follow its setup instructions and test it in the sandbox.

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

  1. Open the template’s repository and select Use this template to create your own copy.
  2. 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.
  3. 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.
  4. 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.
For a fully local app, the starters leave checkout return URLs unset. Return to the app manually after payment. Automatic return requires a public URL; webhook forwarding through the CLI still works locally.

Learn the flow