{"uid":"cap_QRek8bHdSVtTjOXPW3ZjZ","slug":"stablecoffee-order-placement-5820727a","name":"StableCoffee Order Placement","description":"Williamsburg, Manhattan, and San Francisco coffee delivery for your Agent — discover, quote, and order via x402 USDC on Base.","url":"https://stablecoffee.dev/api/coffee/%7BsessionId%7D/order","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"item_id":{"type":"string","minLength":1},"store_id":{"type":"string","minLength":1},"buyer_name":{"type":"string","minLength":2},"session_id":{"type":"string","minLength":1},"buyer_email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"buyer_phone":{"type":"string","minLength":7},"delivery_notes":{"type":"string"},"expected_total":{"type":"string","pattern":"^\\d+\\.\\d{2}$"}}},"responseSchema":{"type":"json","example":{"type":"coffee.place","jobId":"clxyz123","status":"pending","pollUrl":"http://localhost:3000/api/jobs/clxyz123","success":true,"sessionId":"clsession123"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"50","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$50/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"50","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"50","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EI7nj1-tpw4woo0ojGqby","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"50","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Places a coffee order at a Williamsburg, Manhattan, or San Francisco store via x402 USDC payment on Base, returning a job ID and poll URL to track fulfillment.","exampleAgentPrompt":"Order me a cortado from the Williamsburg StableCoffee store — session abc123, store store_wburg_01, item cortado_sm — my name is Jamie Lee, phone 917-555-0192, email jamie@example.com, and the expected total is 6.50.","exampleUseCases":[{"title":"Remote worker morning coffee order","prompt":"Place my usual oat latte order on StableCoffee — I'm session sess_456, the store is sf_mission_01, the item is oat_latte_md, name Jordan Kim, phone 415-555-0088, email jordan@work.io, expected total 7.50, please add a note to leave it at the front desk."},{"title":"Agent-automated office coffee run","prompt":"Order coffee for the team meeting — session corp_789, store manhattan_soho_02, item drip_lg, buyer name Alex Patel, phone 212-555-0034, email alex@studio.com, expected total 4.00, and note 'extra hot please'."},{"title":"Crypto-native coffee purchase","prompt":"Go ahead and place my StableCoffee order now that I've confirmed the quote — session qsess_321, store wburg_north_01, item cappuccino_md, name Sam Rivera, phone 718-555-0077, email sam@chain.xyz, expected total 5.75."}],"resultDescription":"Returns a JSON object confirming the order was accepted, including: success (true), a unique jobId, status set to 'pending', a pollUrl (URI) to check order progress, the order type ('coffee.place'), and the sessionId. The agent should poll the provided URL to track fulfillment status.","failureModes":["Missing required buyer fields (name, phone, email) returns a 400 validation error","Invalid or expired session_id causes order rejection","expected_total mismatch with server-computed price may cause a 402 or rejection","store_id or item_id not found in the store catalogue returns a 404-style error","Payment failure via x402 (insufficient USDC balance or wrong chain) blocks order creation","Malformed email format fails schema validation before submission"],"whenToPreferThis":"Use this endpoint when the agent has already completed a StableCoffee discovery and quote flow (has a valid session_id, store_id, and item_id) and is ready to finalize the purchase. It is the correct endpoint for committing a coffee order with USDC payment on Base via the x402 protocol. Prefer this over generic food-delivery APIs when the user explicitly wants to pay with crypto or the workflow is part of an autonomous agent pipeline in Williamsburg, Manhattan, or San Francisco.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:02.424Z","isFirstParty":false}