Skip to main content
The sandbox is a separate Bachs environment you can use to build and test your integration freely. It runs independently of your live account. Anything you do in sandbox has no effect on production.
Want to feel the sandbox before wiring anything? The live demo is a storefront running entirely on it: real API, real checkout, test cards, no real money.

Switching to Sandbox

To enter the sandbox, click the organization switcher dropdown at the top left of your dashboard and select Sandbox. The dashboard will reload showing your sandbox account with its own separate balance, charges, and settings. To switch back, select your organization name from the same dropdown.

Sandbox API

All API requests in sandbox mode should be directed to a different base URL: Replace the base URL in your integration when testing. Endpoints, request structure, and response shapes are identical.
API keys are environment-specific. Your production keys will not work against the sandbox URL. Generate a separate set of API keys from within your sandbox account.

Isolated Environment

Sandbox is entirely separate from your live account. None of the following are shared between environments:
  • Balance and charge history
  • Customers and payment methods
  • Payout destinations
  • Webhook endpoints and event history
  • API keys
Changes made in sandbox, including creating customers, initiating withdrawals, and configuring webhooks, will never appear in production and vice versa.

Test payment outcomes

A sandbox payment succeeds by default and finalizes on its own, about a second after the customer pays. No real money moves. To test how your integration handles a failure:
  • Cards: pay with one of these numbers. Any other card number succeeds.
  • Bank transfer, mobile money and crypto: use the test controls on the sandbox checkout page to make the payment succeed, fail, or arrive underpaid.
  • Refunds: send simulated_outcome as success or failed. See Issue a refund.
Each outcome sends the same webhooks as in production, so test your handler against every result before you go live.

Authentication

Generate API keys for sandbox and production.

Webhooks

Set up a webhook endpoint to receive sandbox events.