Sandbox & live
Use the sandbox to build and test your whole integration. Switch to live by changing only the key.
Sandbox (gok_test_…) | Live (gok_live_…) | |
|---|---|---|
| Stores, menus, prices, availability | Real | Real |
| Delivery quotes, search, offers | Real | Real |
| Order creation | Simulated — stored for you, never sent to a restaurant | Real order in the restaurant’s dashboard |
| Order IDs | sbx_… | 24-character hex |
| Status changes | You drive them with POST /sandbox/orders/{id}/advance | The restaurant and rider drive them |
| Card payments | Simulated (payment: "paid" or "failed") | Real card payment page |
| Webhooks | Delivered, with "environment": "sandbox" | Delivered, with "environment": "live" |
| Cost | Free | Orders are real |
What the sandbox validates for you
Section titled “What the sandbox validates for you”It runs the same business rules as live, so errors you meet in testing are errors you will meet in production:
store_closed— closed or paused stores refuse ordersout_of_zone— the address is outside the store’s delivery radiusbelow_minimum_order— delivery orders below the store’s minimumitem_unavailable— items that are hidden, unavailable or not sold by that storeidempotency_conflict— the sameIdempotency-Keywith a different body- Prices are always calculated by GoOrder; you never send totals.
Driving the lifecycle
Section titled “Driving the lifecycle”# next status in the flowcurl -X POST .../sandbox/orders/sbx_ID/advance -H "Authorization: Bearer $KEY" -d '{}'
# jump to a specific statuscurl -X POST .../sandbox/orders/sbx_ID/advance -H "Authorization: Bearer $KEY" \ -H "Content-Type: application/json" -d '{"status":"out_for_delivery"}'
# simulate the customer paying (or failing to pay) by cardcurl -X POST .../sandbox/orders/sbx_ID/advance -H "Authorization: Bearer $KEY" \ -H "Content-Type: application/json" -d '{"payment":"paid"}'Each call fires the same webhook a real change would, so you can test your handlers end to end.
Moving to live
Section titled “Moving to live”Nothing in your code changes except the key. Work through the Going-live checklist first.