Going live
A sandbox and a live business answer the same API in the same way, so going live is a change of key and of business, not of code. Go through this list before you switch.
Switch to a live key
- The live business's owner or an admin makes a live key in its admin, at
/{slug}/admin/api, with the scopes your integration needs and no more. It startsbk_live_and is shown once. - Store it as a secret, in your server's secret manager or environment: never in browser or mobile code, and never in a URL.
- Point your integration at the live business's slug:
https://bookatu.com/api/v1/{slug}. - Replace the
bk_test_key with it. A test key at a live business is refused with403LIVEMODE_MISMATCH, so a key left behind fails loudly rather than quietly. - When the business needs the AI & API add-on for its keys (it is included on the Scale plan), the owner turns it on first; without it a keyed call answers
403Enable the AI & API add-on.
Checklist
- The live key is stored as a secret on your server only, and no test key is left in your production configuration.
- Your webhook endpoints are made again on the live business: a sandbox's endpoints and their signing secrets do not carry over. Each live endpoint has its own signing secret, shown once; verify every delivery with it.
- Your code checks
livemode(or theBookatu-Livemodeheader) and never treats alivemode: falseanswer or webhook as real, nor alivemode: trueone as a test. - You send
Bookatu-Versionwith the version you tested against, so a later version never changes what you get. - You handle
429: waitRetry-Afterseconds and back off with jitter (see Rate limits). - Deposit, card-hold and no-show flows were tried with the simulated checkout and the simulator, a declined card and an expired checkout included.
- No test data is copied into the live business: its clients, bookings and services are its own, and a sandbox's made-up clients must never be imported.
- A front end on the keyless endpoints no longer sends
Bookatu-Livemode: false. - Your error handling reads
code(such asTIME_NEEDS_OFFSET,DEPOSIT_NEEDS_BOOKING_PAGE,CARD_REQUIRED_USE_BOOKING_PAGEorMANAGE_KEY_REQUIRED) rather than the words, which may change.
After you switch
Keep the sandbox for testing your next change, and reset it when its data gets in the way; it is deleted after 30 days without use, with a warning 7 days before. Watch the changelog, and your logs for a Deprecation header.