Delivery in sandbox

Sandbox

A sandbox cart sent for delivery is delivered by a simulated driver, at a test restaurant or at a real restaurant whose menu Layout holds. The driver is booked, reaches the restaurant, collects the food and arrives, and your webhooks hear each step as they will in production. Nothing is charged.

What changed

  • simulate in a delivery fulfillment. Sandbox keys only: delivered (the default), left_at_door, running_late, courier_canceled, no_courier, lost or returned. A live key that sends it is refused with 400 invalid_request. Test restaurants ignore the cart's own simulate, never the delivery's.
  • Timing. With latency: "realistic", the default, a delivery takes about 85 seconds to delivered. With latency: "instant", any ending runs end to end in under about 15 seconds.
  • What it reads as. The simulated delivery fee is $4.99, amounts.charged_minor stays null because nothing is charged, and nothing is saved to the test person's account. A sandbox address with a digit in it resolves near the test restaurants with no lookup; one without is address_not_found. test_place_delivery_far is out_of_range, with test_place_placed as the alternative.
  • Not counted. Sandbox quotes and address lookups never count toward the delivery limits.
  • MCP and the CLI. A sandbox delivery over MCP ends delivered. From CLI 0.5.4, layout test-order --deliver-to "500 Howard St" --courier <ending> runs a whole delivery and exits 0 only when it ends that way.
{
  "placeId": "test_place_placed",
  "request": "a latte",
  "fulfillment": { "type": "delivery", "address": "500 Howard St, San Francisco, CA", "simulate": "running_late" },
  "latency": "instant"
}

What to do

Send each ending once and check your integration handles it: a delivery that arrives, one that becomes a pickup, and one that fails. What each ending does to the order, its events and the charge is in Test every ending.

Breaking changes

None.

All changes