Developers

Test mode and sandboxes

Developers can build and test against a sandbox business with bk_test_ keys, where nothing reaches a real client or moves real money.

What it is

A sandbox is a test business inside Bookatu, made for building and testing an integration. It answers the same API with the same booking rules and sends the same webhooks as a live business, but every email, text and notification it would send is kept in its Outbox, and every payment goes through a simulated checkout. The full developer guide is Testing with a sandbox, at /developers/testing.

Why it helps

Your developer can try every call, deposits and webhooks included, without touching your real business, your clients or a real card. A sandbox says Test mode on every page of its admin and Test business on its booking pages, and it is never listed anywhere public.

How to use it

  1. 1Sign in with a Bookatu account whose email is confirmed and open /developers/sandbox. You don't need a business on Bookatu. Pick a name, a time zone and a currency, accept the test-mode terms and make your sandbox. You can have up to 3 at a time. If the page says making sandboxes is switched off at the moment, they are not open yet.
  2. 2Each sandbox comes with sample staff, services, clients and bookings, and a first test key with every scope. Test keys start bk_test_ and live keys start bk_live_. Make more keys and webhooks in the sandbox's own admin, under Settings, then API & monitoring.
  3. 3A test key works only on a sandbox, and a live key only on a live business. The other way round is refused before anything runs, with 403 LIVEMODE_MISMATCH, and every answer says which kind of business it reached in livemode.
  4. 4What the sandbox would have sent is under Outbox in its admin, and every payment it made in test mode is under Test payments, beside it: paid, declined, abandoned or refunded. Its checkouts have Pay (test), Decline (test) and Abandon buttons instead of a card form, so never type a real card number into a sandbox. The simulator makes events happen now, such as a deposit being paid.
  5. 5Reset wipes a sandbox and fills it with fresh sample data, and Delete removes it, both from your sandboxes page. A sandbox nobody uses for 30 days is deleted, and you get an email 7 days before.
  6. 6Every call, with examples, is in Testing with a sandbox at /developers/testing, and as markdown at /developers/testing.md. When it works, Going live at /developers/going-live says how to switch to a live business's key.

Was this helpful?

Didn’t find what you need?

Contact support or browse the FAQ.