Skip to content

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, availabilityRealReal
Delivery quotes, search, offersRealReal
Order creationSimulated — stored for you, never sent to a restaurantReal order in the restaurant’s dashboard
Order IDssbx_…24-character hex
Status changesYou drive them with POST /sandbox/orders/{id}/advanceThe restaurant and rider drive them
Card paymentsSimulated (payment: "paid" or "failed")Real card payment page
WebhooksDelivered, with "environment": "sandbox"Delivered, with "environment": "live"
CostFreeOrders are real

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 orders
  • out_of_zone — the address is outside the store’s delivery radius
  • below_minimum_order — delivery orders below the store’s minimum
  • item_unavailable — items that are hidden, unavailable or not sold by that store
  • idempotency_conflict — the same Idempotency-Key with a different body
  • Prices are always calculated by GoOrder; you never send totals.
Terminal window
# next status in the flow
curl -X POST .../sandbox/orders/sbx_ID/advance -H "Authorization: Bearer $KEY" -d '{}'
# jump to a specific status
curl -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 card
curl -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.

Nothing in your code changes except the key. Work through the Going-live checklist first.