Sandbox
How to test without moving real money
Section titled “How to test without moving real money”1. Use minimum amounts
Section titled “1. Use minimum amounts”Create orders with the minimum allowed per currency (find it in the min_amount field of GET /currencies). In general, 1 MXN or equivalent.
2. Let test orders expire
Section titled “2. Let test orders expire”If you create an order and do not pay, it expires automatically in 15-60 minutes (moves to EX) or in 24h (CA). No cost is incurred.
3. Use POST /orders/ without input_currency
Section titled “3. Use POST /orders/ without input_currency”This creates the order without forcing a specific payment flow; the customer would pick on the gateway. If you are the “customer” of the test, simply close the tab and let it expire.
4. Use a dedicated device for testing
Section titled “4. Use a dedicated device for testing”Create a new device named pruebas-integracion (or similar). Use it only for integrations. If something goes wrong, you can disable it without affecting your real operations.
Webhook verification without waiting
Section titled “Webhook verification without waiting”To verify your HMAC implementation is correct without depending on real traffic, use the official test vectors. They are deterministic; your code must produce the signature the test expects.
Creating a test device via API
Section titled “Creating a test device via API”curl -X POST \ -H "X-Device-Id: $B4BIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "pruebas-integracion"}' \ https://pos.b4bit.com/api/v1/device/The response includes a new identifier (API Key of the freshly created device). Use it in your local tests and disable it from the dashboard when you are done.
Alternatives while a sandbox arrives
Section titled “Alternatives while a sandbox arrives”- Local mocks with
mswornockin Node,responsesin Python,http_mockin PHP. Mock endpoints against the OpenAPI schemas. - Replay webhooks manually: craft a POST with the current nonce, sign it with your Secret, and send it to your local endpoint (with
ngrok/cloudflaredif you need a public URL).
Roadmap
Section titled “Roadmap”Availability of a public sandbox is on the B4bit Pay roadmap. Subscribe to the changelog to be notified when it launches.