Skip to main content
The sandbox is a second Bachs environment, separate from your live account, where charges are simulated and no real money moves. It has its own base URL, its own keys and its own data, and everything your integration will do in production works the same way here. Run a payment, a refund and a payout end to end before your account is verified, then go live by swapping the key.To see it before you write any code, open the live demo, a storefront that runs entirely on the sandbox.
The sandbox checkout for a product priced in US dollars and paid in naira, with the Test cards panel open: one card that succeeds and four that fail in different ways

Switch to the sandbox

In your dashboard, open the organization switcher at the top left and choose Sandbox. The dashboard reloads with your sandbox account: its own balance, charges and settings. Choose your organization name from the same menu to switch back.

Point your code at the sandbox

Endpoints, request bodies and response shapes are identical in both. Only the base URL and the key change. Keys belong to one environment, so a production key sent to the sandbox URL is rejected. Create sandbox keys from inside your sandbox account; see Get your API keys.

Nothing is shared with production

The sandbox and your live account keep separate copies of all of this:
  • Balance and charge history
  • Customers and payment methods
  • Payout destinations
  • Webhook endpoints and event history
  • API keys
A customer you create, a withdrawal you start or a webhook you configure in the sandbox never appears in production, and the reverse is also true.

Test payment outcomes

A sandbox payment succeeds by default and finalizes on its own, about a second after the customer pays. 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 cards panel 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 production, so test your handler against every result before you go live.

Next steps

Get your API keys

Create a sandbox key and send your first request.

Set up webhooks

Receive sandbox events at an endpoint of yours.

Create and verify your account

Going live is a key swap after one verification.