Skip to main content
Use a prompt when you have one job to do and nothing to install: each prompt carries the Bachs rules for that job, so a coding assistant that can work with your app’s code, such as Claude Code, Cursor, GitHub Copilot or Codex, knows what to read, what to build and what to test. If you will use Bachs across many tasks, install the Bachs skill instead, and your assistant follows the same rules without a prompt.

Before you start

  • Have an app your assistant can inspect, and decide what customers will buy. Starting a new app? Choose a starter template first, then use a prompt to adapt it.
  • Get a sandbox API key. Keep it in your server’s environment; do not paste it into a chat.
  • Let your assistant read the linked docs. If it cannot open them, use Copy page on each guide and paste the content alongside the prompt.
  • Use the Bachs CLI to forward sandbox webhooks to your machine.
  • For a Node.js or TypeScript server, the prompts use the official Node.js SDK; install it with npm install @bachs/sdk (Node.js 22 or later). For a Python server, they use the official Python SDK; install it with pip install bachs (Python 3.10 or later). The SDKs handle API requests, typed responses and webhook signature verification. Your app still owns authentication, order state, access, and delivery recovery.
Checkout return URLs must be public. For a fully local app, omit checkout redirects and return to the app manually after paying; the CLI still forwards webhooks locally. Use a public deployment or tunnel if you need an automatic return. Every prompt includes its own integration rules. You can use it without creating an AGENTS.md file or installing a skill. Building a marketplace? Its prompt is on the marketplace use case, because Connect is not yet in the SDK.

Accept a one-time payment

What you’ll build: a customer chooses an item, pays on Bachs checkout, and your app fulfils the order after confirming payment. Have ready: what you sell, its price and currency, and the action that completes an order. Products can be created in the dashboard or through the Products API.
Prompt
Check the result
  • A successful sandbox checkout pays the correct order and fulfils it once.
  • Opening the success URL before paying leaves the order unpaid.
  • An unsuccessful checkout does not fulfil the order.
  • Redelivery cannot repeat fulfilment; failed handling can recover on redelivery.
  • An unrelated payment or virtual-account deposit cannot pay the order.
After this works, add an overlay checkout, local pricing, or refunds.

Sell subscriptions

What you’ll build: monthly and yearly plans, access that follows subscription state, and a Manage billing button for the customer portal. Have ready: signed-in users, your plans, and a decision about access during a failed renewal. The current subscription guide supports USD card billing and free trials.
Prompt
Check the result
  • A sandbox payment saves the user’s customer ID and subscription, then grants access.
  • A redirect alone cannot grant access.
  • Duplicate or older events cannot undo a later cancellation.
  • Manage billing opens the signed-in user’s own customer portal.
  • Scheduled cancellation keeps access for the remaining paid period; immediate cancellation removes it.
  • Renewal failure follows your access policy and can recover after a successful retry.
The full walkthrough includes requests, webhook examples, and a go-live checklist. Add trials or plan changes after the basic flow works.

Review before go-live

What you get: a list of problems in your Bachs integration, by file and line and ordered by risk, with what correct code does. The assistant does not change your code. Have ready: an integration you have built, with or without an assistant. Run this before you switch to production keys, and again after large changes.
Prompt
Check the result
  • Every problem names a file and line you can open.
  • Fix the problems, then run the prompt again until it reports none you disagree with.
  • A review reads code. It does not prove a payment works. Complete a real sandbox payment, including a failure case, before you go live. See Test payment outcomes.
Then follow Create and verify your account, or Take Connect live for a marketplace: create production resources, use the production key and API URL, and register a webhook endpoint with its own signing secret.

Use the skill instead

If you will use Bachs on more than one task, install the Bachs skill. It gives your assistant the same rules as these prompts on every task, including marketplace payments, with nothing to copy.