Case Study: How an AI Agent Buys a Product in 8 Steps (Demo Store Walkthrough)
Walk through the exact 8-step flow an AI agent follows to discover, compare, and purchase a product from the Trusteed demo store. No API key needed for discovery: try it yourself with the curl examples.
Felix Pumeda Seoane10 min
Executive summary
End-to-end case study of an AI agent purchasing from the Trusteed demo store. Covers the complete 8-step MCP flow: search → product details → create cart → shipping rates (with elicitation) → select shipping → apply discount → preview → checkout. Includes runnable curl examples and explains trust scoring, protocol detection, and address elicitation in Claude.ai.
In this article
What does it look like when an AI agent buys something? In this walkthrough, we'll follow a Claude agent through every step of a sandbox purchase from the Trusteed demo store: 18 products, 6 categories, 3 discount codes, multiple shipping options, and a checkout flow that handles payment and address collection natively inside the chat. Every curl command in this post works against the live demo endpoint right now — and the endpoint itself reports `store_environment: "sandbox"` on every search response. The final step uses `payment_method: "MOCK"`: it creates an order and moves no money. Which rails can settle real value depends on the rail and on each merchant; /en/status carries the per-rail state taken from the signed capability registry. Note 2026-10-11: the statement about settled payments was updated to reflect the measured state, per rail and per merchant.
The demo store endpoint is public and rate-limited to 500 requests per 15 minutes per IP across the API (the global cap, which governs sustained traffic; the discovery bucket allows up to 1000/min per IP inside it). No API key needed for discovery tools. Every checkout tool needs one, create_cart included: get a free 24-hour sandbox key with POST /api/v1/sandbox/key. The checkout tools that spend or settle need an X-Payment-Mandate header; the other checkout tools create_cart and attach_agent_identity and verify_age_over_n and verify_residence_country and verify_legal_person_authorization and apply_discount and get_shipping_rates and select_shipping_option and create_payment_mandate and update_payment_mandate and cancel_payment_mandate and ucp_create_checkout and ucp_update_checkout and ucp_add_items_to_checkout and ucp_get_checkout and ucp_cancel_checkout and update_cart and cancel_checkout and get_checkout_state and quote_checkout and get_trust_receipt and verify_trust_receipt don't need it.
The Setup: 18 Products, Zero Configuration
The demo store ships with 18 curated products across 6 categories: sneakers (4), jackets (3), accessories (3), pants (3), t-shirts (3), and footwear (2). These aren't placeholder items: each product has realistic pricing, variant options (size/color), stock levels, ratings with review counts, and complete metadata including weight, material, and origin. Ratings are merchant-asserted, and every search response says so in a `rating_provenance` block — Trusteed does not verify them. Key products you'll see in this walkthrough (measured against the live endpoint on 2026-09-22): • Nike Air Max 90: $130 (was $160), 4.7★ from 324 reviews, sizes US 8–10 • The North Face Nuptse Jacket: $320 (was $380), 4.8★ from 512 reviews, 700-fill goose down • Adidas Ultraboost 23: $190, 4.5★ from 189 reviews • New Balance 574 Classic: $89.99, 4.3★ from 156 reviews The demo store's trust score was 44.7/100 (v4.1), band RESTRICTED, STANDARD verification when this post was last reviewed on 2026-09-22. Don't take that number from here: it moves, and the authoritative value is signed and served at https://api.trusteed.xyz/api/v1/stores/demo-store/trust-score. Every MCP response from this store carries the current value in its `merchant_trust` block. RESTRICTED clears the hard eligibility floor (≥ 0.3 on the 0–1 scale) — so the agent can transact — but it is not a high score, and it is not meant to be: the demo store is a sandbox with no settled orders behind it, and the model says so.
Step 1: Search Products
The agent starts by searching the catalog. No authentication needed. ```bash curl https://trusteed.xyz/demo-store/mcp/discovery \ -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_products","arguments":{"query":"running shoes","limit":5}},"id":1}' ``` The response returns matching products ranked by relevance and trust score. Each result includes: id, title, price, currency, rating, stock status, and image URL. The agent now has product IDs it can use in subsequent steps.
Step 2: Get Product Details
With a product ID from search, the agent fetches complete details including variants, specifications, and Schema.org JSON-LD. ```bash curl https://trusteed.xyz/demo-store/mcp/discovery \ -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_product_details","arguments":{"product_id":"prod-001"}},"id":2}' ``` The response includes everything the agent needs to make a recommendation: price vs compare-at price (for discount calculation), variant options with per-variant stock, material composition, weight, and a full JSON-LD block the agent can use for semantic reasoning.
Step 3: Create a Cart
Now the agent adds items to a cart. This requires a sandbox API key. ```bash # First, get a 24-hour sandbox key curl -X POST https://trusteed.xyz/api/v1/sandbox/key # Returns: {"key":"agnt_sandbox_...","expires_in":86400} # Create cart with the key curl https://trusteed.xyz/demo-store/mcp/checkout \ -X POST \ -H "Content-Type: application/json" \ -H "X-Agent-Api-Key: agnt_sandbox_..." \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"create_cart","arguments":{"items":[{"product_id":"prod-001","quantity":1,"variant_id":"v-snk-001a"}]}},"id":3}' ``` The response includes a `cart_id` (UUID), line items with pricing, and a `status: "NOT_READY_FOR_PAYMENT"`. The cart needs shipping and checkout to be complete. The `agent_session_id` is also returned, which can be used to resume this cart later.
Step 4: Get Shipping Rates (with Elicitation)
This is where things get interesting. When the agent calls `get_shipping_rates` without a shipping address, the MCP server triggers elicitation: a native MCP feature that collects user input inline. In Claude.ai, the user sees an inline form appear directly in the chat: - Street address - City - Country code (ISO-2: US, ES, DE...) - ZIP code - Province/State (optional) The user fills in the form, Claude passes the data back to the tool, and shipping rates are calculated. No redirects, no external pages: the entire interaction happens inside the conversation. The demo store returns two options: - Standard (5–7 days): $9.99 - Express (2–3 days): $24.99
Step 5: Select Shipping Option
Step 6: Apply a Discount Code
Step 7: Preview Checkout
Step 8: Complete Checkout
What the Agent Sees Behind the Scenes
Throughout this flow, several invisible systems are at work: • Trust scoring: The demo store's score (44.7/100 on 2026-09-22, band RESTRICTED) clears the hard eligibility filter (≥ 0.3 on the 0–1 scale), which is what lets the checkout proceed at all. Trust also carries 25% of the search ranking weight (the formula is published in each /api/v1/search response), so a RESTRICTED store is eligible, not favoured. • Protocol detection: Each request is analyzed by the protocol-detector middleware, which picks an adapter from the payment method. Read "supported" carefully here: the demo store has ACP, AP2, x402 and UCP switched on in its own configuration, but the platform state of those rails is what decides whether anything can settle — and today none of them settles real value. ACP and x402 are SANDBOX: ACP runs on Stripe test mode for the demo store, and x402 has dated test settlements on Base Sepolia in the registry, answering `x402_not_configured` to any merchant without an enabled x402 configuration; AP2 v0.1 over REST is withdrawn and v0.2 over UCP is still under construction. The signed capability registry at /.well-known/trusteed-capabilities.json is the arbiter, and /en/status renders it. That is why this walkthrough uses MOCK. • KYAI policy engine: Every checkout intent passes through the merchant's policy rules before an order is created. What they return depends on the rules that merchant has configured and on the agent's own identity and mandate, not on the store's score alone — a blocked checkout comes back as a refusal with a rule code, not as a silent failure. • Rate limiting: The demo endpoint caps at 500 requests per 15 minutes per IP across the API (the global cap, which governs sustained traffic; the discovery bucket allows up to 1000/min per IP inside it). Sandbox keys get 50 checkout requests/hour. Production access is rolled out according to environment and merchant enablement, not public self-serve tiers. • Session cleanup: Cart sessions expire after 30 minutes of inactivity. Each request creates a fresh MCP server instance: no persistent connections.
Try It Yourself
The fastest way to experience this flow: 1. In Claude.ai: Add the MCP server URL `https://trusteed.xyz/demo-store/mcp/discovery` to your Claude Desktop config and ask Claude to 'search for running shoes on the demo store' 2. Via curl: Copy any of the commands above and run them in your terminal. Discovery tools work immediately with no setup. 3. In the playground: Visit trusteed.xyz/en/demo-store and use the interactive MCP playground to run tools visually with a session trace panel. 4. Via NLWeb: Try natural language search at `POST /demo-store/ask` with `{ "query": "cheap waterproof jacket", "mode": "list" }` for semantic vector search.
Frequently asked questions
Do I need an API key to search products in the demo store?
No. The discovery tools (get_site_map, get_page_content, search_products, search_products_enriched, get_product_details, compare_products, create_sandbox_key, browse_categories, nlweb_ask, search_docs, get_merchant_profile, get_payment_methods, get_store_trust, get_purchase_guide, get_checkout_conditions) work without authentication on the demo endpoint. Every checkout tool (create_cart, apply_discount, get_shipping_rates, select_shipping_option, preview_checkout, complete_checkout, ucp_create_checkout, ucp_update_checkout, ucp_add_items_to_checkout, ucp_complete_checkout, ucp_preview_checkout, ucp_get_checkout, ucp_cancel_checkout, get_checkout_state, quote_checkout, get_trust_receipt, verify_trust_receipt) needs a sandbox key, create_cart included (get one free with POST /api/v1/sandbox/key), and the checkout tools that spend or settle need an X-Payment-Mandate header; the other checkout tools create_cart and attach_agent_identity and verify_age_over_n and verify_residence_country and verify_legal_person_authorization and apply_discount and get_shipping_rates and select_shipping_option and create_payment_mandate and update_payment_mandate and cancel_payment_mandate and ucp_create_checkout and ucp_update_checkout and ucp_add_items_to_checkout and ucp_get_checkout and ucp_cancel_checkout and update_cart and cancel_checkout and get_checkout_state and quote_checkout and get_trust_receipt and verify_trust_receipt don't need it.
What happens if I call complete_checkout twice with the same idempotency key?
The second call returns the same result as the first without creating a duplicate order or charge. This is by design: idempotency keys ensure safe retries in case of network failures. Always pass an idempotency_key for complete_checkout.
How does address elicitation work outside of Claude.ai?
Elicitation is an MCP SDK feature (v1.28.0+). In Claude.ai, it renders as an inline form. In other MCP clients, the behavior depends on the client implementation. You can also skip elicitation by passing the shipping_address directly in the get_shipping_rates arguments.
Are the discount codes real?
In sandbox mode, yes: WELCOME10 (10% off), DEMO20 (20% off), and FREESHIP (free shipping) all work and correctly adjust the cart total. In production, merchants configure their own discount codes.
Can I test PayPal or x402 checkout in the demo store?
The demo store has several payment methods switched on, but only one completes a walkthrough today: 'MOCK', which creates an order and charges nothing. 'ACP' routes to Stripe in test mode and 'PAYPAL' to PayPal sandbox with a buyer approval redirect; neither settles real value. x402 is not part of this walkthrough: the registry records test settlements on Base Sepolia for demo-store (SANDBOX, dated in its evidence), and a merchant without an enabled x402 configuration answers `x402_not_configured`. The signed registry at /.well-known/trusteed-capabilities.json is the arbiter for each rail's state, and /en/status renders it.
Sources and references
- Model Context Protocol: Elicitation
Anthropic
- Trusteed Demo Store
Trusteed
- JSON-RPC 2.0 Specification
JSON-RPC Working Group
Published
2026-04-06
Updated: 2026-09-22
Author
Felix Pumeda Seoane
Founder · Published by Trusteed
Felix Pumeda Seoane is the founder of Trusteed, as recorded in the site's legal notice. Technical claims in these articles are backed by the surfaces linked from each piece and by the signed capability registry at /.well-known/trusteed-capabilities.json, which is the arbiter when an article and a status surface disagree.
About TrusteedCategory
Case Studies
Related articles
Developer Guides
Building Agentic Commerce #1: Multi-Protocol Checkout with MCP + x402 + ACP in One Flow
One agent, three protocols, one checkout. Here's how MCP, x402 stablecoin payments, and ACP work together to let AI agents buy products, with code examples you can run today.
Developer Guides
Building Agentic Commerce #3: Reading Trust Score v4.1
Trust Score v4.1: three weighted dimensions, an optional bonus and confidence caps. Read each response's engine; v2 is only a fallback if the v4.1 calculation fails.
Integration Guides
Odoo + MCP: Connect Your ERP to AI Agents
Connect your Odoo 16, 17, or 18 instance to AI agents; setup time is not benchmarked. One JSON-RPC connector, zero code changes to Odoo. Your products, stock levels, and pricelists become discoverable by Claude, GPT, and other AI agents via MCP. The Odoo integration is in sandbox, so it is not yet a production purchase path.