StablePizza — order whole pies from L'industrie Pizzeria (Williamsburg, Brooklyn) with same-day courier delivery. Pay via wallet: x402 (USDC on Base) or MPP. No card needed from the buyer. What it does: - Places a real prepaid order at L'industrie's Cash App menu with our card, then dispatches a same-day courier to pick it up and deliver to the buyer's address. - Whole pies only. Delivery limited to the Williamsburg / Greenpoint / lower-Manhattan zone; a courier fee (shown in the 402 quote) is added for delivery, and addresses outside the zone are rejected at quote time. Payment model — charge-on-placement: - Your wallet is charged ONLY once the pizzeria order is confirmed placed. If placement fails for any reason, the payment is skipped: no money moves, nothing to refund. - This means POST /api/orders holds the connection open while the real order is placed (~1-4 minutes). Do not time out early, and do NOT retry a request that is still running. - The order's payment_status field tells the truth at all times: "charged" (order placed, wallet debited), "not_charged" (no money was ever taken), "authorized" (decision pending — only while the POST is in flight). - refund_owed=true only appears when a CHARGED order later failed (e.g. the courier abandoned a placed pizza). The wallet is made whole in that case. Happy path: 1. GET /api/menu — show the pies (name, price), tip options, and store hours. Free, no wallet needed. - If store_open is false, tell the user the shop is closed (store_note has the reason + hours) and don't attempt an order. 2. Ask the buyer: - Which pies and how many (max 14 pies total). - Delivery address (full street, city, state, zip), plus any courier instructions ("buzz 4B", "leave with doorman") as delivery_notes — these are passed to the courier. - Tip percent for the L'industrie staff (options: 0/10/15/20%; default 15% if they don't care). - Buyer name + phone (used for the courier delivery and order status texts). The pizzeria order is placed under ' (Gift from AgentCash)' — for pickup orders, tell the buyer to give that combined name at the counter. 3. POST /api/orders { fulfillment: "delivery"|"pickup", items: [{ sku, quantity }], contact: { name, phone }, dropoff_address?, tip_percent?, delivery_notes? } → The wallet payment covers the full amount: pies + tax + tip + delivery (courier fee, delivery only) + a small service fee. → The request drives the real pizzeria order before returning (~1-4 minutes; keep the connection open). You are charged only if it succeeds. → Returns { order_id, status, order_name, payment_status, ... }. 4. GET /api/orders/{order_id} — poll for fulfillment progress. Once placed, share confirmation_number, pickup_ready_at (when the kitchen expects it ready), and for delivery the tracking_url + delivery_eta (courier dropoff ETA; the tracking link has the live view). Rules: - sku MUST come from GET /api/menu, and check its available flag — pies sell out during the day. Ordering a sold-out pie returns 409 item_sold_out (no payment taken). If one sells out between acceptance and placement, the order fails and you are not charged. - If POST /api/orders returns store_closed (409), the shop just closed — no payment was taken; relay the hours and stop. - Always confirm the full total (shown in the 402 quote) and get an explicit "yes" before paying. - Delivery zone is limited; if delivery_unavailable, the address is out of range — no retry will help. - The buyer never enters a card. Payment is wallet-only (x402 or MPP). - Order status flow: paid → placing_order → order_placed → (delivery: dispatching → dispatched → delivered | pickup: ready_for_pickup). Terminal failures are failed or needs_review with failure_reason; check payment_status to know whether money moved (usually it didn't — failures skip the charge).