Build safely with a sandbox key
A test key (abz_test_…) lets you build and test a real integration against realistic responses, with nothing real at stake — no wallet debit, no WhatsApp message, no Stripe charge. Switch to a live key when you’re ready to ship.
Every API key is either Test (abz_test_…) or Live (abz_live_…) — set once when you create it, and fixed after that. A test key is the default for a new key, on the theory that your first call against this API shouldn’t be able to hurt anything. Everything below applies the same way whether you call the API directly or from the interactive console.
- 1
Create a test key
On the Keys page, open New key and leave Environment set to Test — it’s the default. You’ll get a key that starts abz_test_… instead of abz_live_…. A key’s environment is fixed at creation and can’t be changed later, so create a separate live key when you’re ready to ship.
- 2
Call scan, whatsapp/send, or charges exactly like you would live
Every request shape, header, and error case is identical between a test key and a live key — the same 400 for a malformed body, the same 401 for a bad key. The only difference is what happens on success.
- 3
Get a realistic response with nothing real behind it
POST /api/v1/scan returns a fixed, realistic product match. POST /api/v1/whatsapp/send returns success without sending anything. POST /api/v1/charges creates a real charge row you can approve on the confirmation page — but approving it simulates the outcome instead of opening a real Stripe checkout, and nothing is ever charged to a card.
- 4
Switch to a live key when you’re ready
Create a new key with Environment set to Live, or use one you already have. There’s nothing to migrate — your integration code doesn’t change, only which key you send.
What each endpoint does with a test key
| Endpoint | With a test key |
|---|---|
POST /api/v1/scan | Always returns the same realistic match, no vision model call, no wallet debit, no read of your real inventory. |
POST /api/v1/whatsapp/send | Returns success immediately — no message reaches Meta, no wallet debit. Nothing is delivered to the phone number you send. |
POST /api/v1/charges | Creates a real charge row and a real confirmation link, so you can test the full lifecycle — but approving it on the confirmation page simulates approval instead of opening Stripe Checkout. No card is ever charged, and the charge never appears in a payout. |
POST /api/v1/ask | Answers for real, on both test and live keys — it’s never billed and only ever reads your own account’s data, so there’s no real-money or real-message risk to guard against here. |
POST /api/v1/connections | Returns an already-active fixture connection instantly on a test key — no real merchant inbox is reached, merchant_email in the response is a fixed sandbox address, and connection.test_mode is true. |
Example: a test scan
Send any image — a test key never actually calls the vision model, so the request succeeds regardless of what the photo shows:
{
"found": true,
"inventory_id": null,
"name": "Coca-Cola 500ml",
"price": 80,
"cost_price": 60,
"stock_qty": 24,
"unit": "bottle",
"test_mode": true
}Example: a test WhatsApp send
Nothing is sent, to any phone number, including a real one you control:
{
"success": true,
"test_mode": true
}Example: approving a test charge
The confirmation page a test charge’s confirmation_url points to shows a TEST CHARGE banner and a Simulate approve button instead of a real payment form. Approving it returns:
{
"simulated": true,
"status": "approved"
}What’s next
Once your integration behaves the way you expect against a test key, create a live key from the same Keys page and point your integration at it — every request shape stays the same. See Handle errors and retries safely before you flip the switch, so a live retry can’t double-charge or double-send.
Sandbox keys FAQ
Can I turn a test key into a live key, or the other way around?+
No — a key’s environment is fixed at creation and can’t be changed afterward, the same as Stripe’s own live/test key model. Create a new key in the environment you need.
Does a test key count against my plan’s monthly quota?+
Yes — quota and per-minute rate limits apply the same way to test and live keys. What’s different is billing: scan and whatsapp/send never debit your wallet on a test key, since nothing real happens.
Will a test scan ever return "not found" so I can test that path?+
Not yet — a test key always returns the same successful match today. If you need to test your own not-found handling, use a live key with a real photo of something not in your catalog.
Can a test charge’s confirmation link be sent to a real merchant?+
Yes, and it’s safe to — a test charge’s confirmation page never shows a real Stripe checkout, only the Simulate approve/decline buttons, so nothing is ever collected from whoever opens it.