Sandbox carts at real restaurants
In sandbox, POST /v1/carts and the MCP order tool build a cart at a real restaurant from its menu as Layout holds it, with its real items and choices. Nothing is ordered or charged.
What changed
simulatepicks how a sandbox cart ends:placed(the default),failed,unconfirmed,challenge,code,card_declined,price_changed,closedorpickup_later.latency:realistic(the default) builds in 30 seconds for one item and 10 more for each item after it, at most 90;instantskips every wait.engine: "real"builds on the restaurant's own site instead, as production does, 10 a day per developer account. The default isshadow.- Production refuses
simulate,latencyandenginewith400 invalid_request, and MCP withsandbox_only. - Sandbox places list only restaurants whose menu Layout holds, with at least 3 items. A search emptied for that reason carries
emptyBecause: "no_held_menu". - Sandbox menus.
POST /v1/menusand the MCPmenutool answer with the held menu, the one a sandbox cart is priced from. A restaurant without one answers409 menu_not_held. soldOut: truemarks a menu item that is sold out.GET /v1/usagecounts these carts assimulated_builds, 10,000 a day. In sandbox,buildscounts only"engine": "real".
Why it matters
You can test against the restaurants your users will order from, with every ending, in seconds.
What to do
Build sandbox carts with a placeId from a sandbox places search. Test each ending with simulate, and use "latency": "instant" in CI. See Sandbox.
Breaking changes
A sandbox cart builds on the restaurant's own site only with "engine": "real". A sandbox cart or menu read at a restaurant whose menu Layout does not hold answers menu_not_held. The GET /v1/usage name test_restaurant_builds is now simulated_builds.