Test and live keys
A key’s mode is fixed when you make it, and shows in its prefix: sk_test_ and pk_test_, or
sk_live_ and pk_live_. GET /ping tells you a key’s mode too.
| Test keys | Live keys | |
|---|---|---|
| Plans | Every plan, Starter included | Business |
POST /orders |
A dry run: priced and checked, nothing saved | Makes the order |
POST /customers |
A dry run: matched, nothing saved | Finds or adds the customer |
POST /orders/{id}/cancel |
A dry run: checked, nothing changed | Cancels the order |
| Monthly allowance | Never counted | Counted: Business includes 5,000,000 live calls a month |
A test key never changes your books
Section titled “A test key never changes your books”A test key reads your real catalogue, stock, customers and website orders, so you build against
real prices and real answers. Everything it writes is a dry run: the call runs exactly as it would
with a live key, every check and refusal included, and then nothing is kept. No order, customer or
cancellation is saved, no stock moves, no promo code is used, and no email or webhook goes out. The
answer is 200, with "test": true beside what would have happened.
Orders
Section titled “Orders”POST /orders with a test key prices the order from your catalogue, applies your promotions and
checks your real stock, exactly as a live order would, and answers with what the order would come
to:
{ "success": true, "message": "Test key: the order was priced and checked, and nothing was made.", "data": { "order": { "test": true, "status": "pending", "items": [ { "productId": "01a2160c-6b00-7627-af42-d534badeaea4", "name": "Weekend Gift Hamper", "variant": null, "quantity": 2, "unitPrice": 20000 } ], "subtotal": 40000, "discount": 4000, "deliveryFee": 2500, "tax": 0, "total": 38500, "amountPaid": 0, "promotions": [ { "kind": "code", "name": "WEEKEND10", "amount": 4000 } ] } }}A test order that couldn’t go through is refused at once, the same refusal a live order would end with:
{ "success": false, "message": "Not enough \"Weekend Gift Hamper\" at Main store: 4 available, 500 needed.", "error": { "name": "ConflictError", "code": "INSUFFICIENT_STOCK", "statusCode": 409, "details": [ { "productId": "01a2160c-6b00-7627-af42-d534badeaea4", "variantId": null, "storeId": "01a21564-0fa5-73bd-b689-d7a0a4173117", "name": "Weekend Gift Hamper", "available": 4, "needed": 500 } ] }, "requestId": "6b08e145-f4fe-49e5-9d65-d9df67cb689b"}Customers
Section titled “Customers”POST /customers with a test key looks for the customer by phone, then email, as a live key does.
Someone it would add comes back without an id or a createdAt, since nobody was made. Someone it
finds comes back as they would be after the call (an email or address they lacked, added), and
their record stays as it is.
{ "success": true, "message": "Test key: the customer would be added, and nothing was saved.", "data": { "customer": { "id": null, "name": "Tunde Bakare", "phone": "+2348030000009", "email": "tunde@example.com", "address": null, "createdAt": null }, "created": true, "test": true }}Cancelling
Section titled “Cancelling”POST /orders/{id}/cancel with a test key runs the cancel and undoes it: the answer is the order as
it would be, "status": "cancelled", while the order, its stock and its promotions stay as they
were. A cancel that would be refused is refused the same way (ORDER_PAID,
ORDER_NOT_CANCELLABLE).
{ "success": true, "message": "Test key: the order can be cancelled, and nothing was changed.", "data": { "order": { "id": "01a22953-ae27-7590-abe0-609936b06d7c", "orderNumber": "PDSWT-20261129-0008", "status": "cancelled", "paymentStatus": "unpaid", "channel": "website", "customer": { "id": "01a22953-aada-745d-a986-131fbe5367bd", "name": "Kemi Okafor", "phone": "+2348030000002", "email": "kemi@example.com" }, "items": [ { "productId": "01a2160c-6b00-7627-af42-d534badeaea4", "name": "Weekend Gift Hamper", "variant": null, "quantity": 4, "unitPrice": 20000, "discount": 8000, "total": 72000 } ], "subtotal": 80000, "discount": 8000, "deliveryFee": 2500, "tax": 0, "total": 74500, "amountPaid": 0, "promotions": [ { "kind": "code", "name": "WEEKEND10", "amount": 8000 } ], "deliveryAddress": "12 Admiralty Way, Lekki, Lagos", "createdAt": "2026-11-29T22:01:19.684Z" }, "test": true }}Moving to live
Section titled “Moving to live”Upgrade to Business in Settings › Plan & Billing, then make a live key beside your test key. Your code stays the same: only the key changes. Follow Go live for the checklist.