Switch to the sandbox
In your dashboard, open the organization switcher dropdown at the top left and select Sandbox. The dashboard reloads with your sandbox account and its own balance, charges and settings. To switch back, select your organization name from the same dropdown. The sandbox is entirely separate from your live account. None of these are shared between the two:- Balance and charge history
- Customers and payment methods
- Payout destinations
- Webhook endpoints and event history
- API keys
Create a sandbox key
While you are in the sandbox, open the developer section of the dashboard and click Create secret key. Give the key a name and the scopes your integration needs. A key cannot reach any endpoint outside its scopes. Sandbox keys start withsk_sandbox_ and route to https://sandbox-api.bachs.io. Production keys start with sk_live_ and only work after your account is verified. Keep the key in an environment variable, never in source control or client code:
Set your key
Install the CLI
The Bachs CLI is a single binary with no runtime to install first.Pair against sandbox
Install a server SDK
The official SDKs run on your server only. The Node.js SDK needs Node.js 22 or later, and the Python SDK needs Python 3.10 or later.environment: "sandbox". See the Node.js SDK and the Python SDK for setup, including pnpm, yarn, uv and Poetry.
Forward webhooks to your machine
Bachs confirms payments with webhook events. While you build, forward live sandbox events to a local port. The connection opens outbound, so you need no public URL and no tunnel.Forward every event
--events with a comma-separated list to forward only some event types. See Test webhooks locally for the signing secret and verifying a real signature.
Make your first request
Send your sandbox key as a Bearer token. This lists your products:Sandbox
200 and your products in items. A sandbox you have just created has none yet, so the list is empty until you create a product. A 401 means the key is wrong or missing; see Get your API keys.
When you go live, the request is the same against https://api.bachs.io with an sk_live_ key.
Next steps
- Accept a payment with Checkout: create a hosted checkout and confirm the payment with a webhook.
- Test webhooks locally: receive live events on your machine and verify a real signature.
- Bachs CLI: every command for working with your integration from the terminal.
- SDKs: the official server SDKs, the browser checkout overlay and community SDKs.

