Skip to content

Playbook for Developers

How to build shopping agents and merchant integrations: agent architecture, product search options, MCP, ACP and UCP checkout, payment tokens, evals, and security.

Updated October 4, 2026 7 min read .md

In short: A shopping agent is an LLM loop wrapped around three hard problems: finding the right product from reliable data, completing checkout through a protocol the merchant supports, and handling payment credentials safely. Most of the engineering effort goes into data quality, protocol plumbing, and guarding against prompt injection, not into the model itself.

What changes for developers

Before 2025, “commerce integration” meant a storefront API or an affiliate feed. As of October 2026 there are open protocols for each step of an agent-mediated purchase: MCP for tool access, ACP and UCP for catalog and checkout, AP2 for signed payment authorization, and network programs such as Visa Intelligent Commerce and Mastercard Agent Pay for tokenized credentials. You will usually be building on one side of these protocols: the agent side (a shopping assistant) or the merchant side (exposing a catalog and checkout to agents). This page covers both.

Architecture of a shopping agent

A typical shopping agent has six components:

ComponentResponsibilityNotes
OrchestratorLLM loop that plans, calls tools, and asks clarifying questionsKeep tool count small and descriptions precise
Product retrievalSearch, filter, and fetch product detailsThe largest driver of answer quality
Ranking and comparisonScore candidates against user constraintsPrefer deterministic filters for hard constraints such as price and size
Cart and checkoutCreate and update checkout sessions with merchantsACP, UCP, or hand-off to a merchant URL
PaymentsObtain scoped credentials and user approvalTokens, mandates, wallet integrations
Memory and preferencesSizes, addresses, brand preferences, past ordersTreat as sensitive personal data

The orchestrator should never be the only thing standing between a model output and a charge. Put hard checks (price ceilings, merchant allowlists, explicit confirmation) in code. See levels of autonomy for how much to delegate.

Product search and catalog options

Retrieval quality depends on the source. There are three broad approaches, often combined:

ApproachProsCons
Crawling and scraping merchant sitesBroad coverage, no partnerships neededBrittle, stale, legally contested, blocked by bot management
Merchant and platform feeds (Merchant Center, ACP feeds, Shopify Catalog)Authoritative, structuredRequires agreements or platform access; coverage limited to participants
Third-party product APIsNormalized schema across many merchants, ready-made searchDependency on a vendor; check freshness and coverage for your categories

Platform catalogs are increasingly available directly: Shopify offers a Global Catalog across its merchants and per-store Storefront Catalog tools via MCP. Cross-merchant product APIs are another option; Channel3, for example, provides search across a normalized multi-retailer catalog through an API, SDK, CLI, and MCP server, with filters for price, brand, and attributes and URL-based product lookup. Evaluate any provider on coverage in your categories, price and availability freshness, variant handling, and how purchases are attributed.

General web search APIs built for agents (such as Exa, Parallel and Tavily) return web pages rather than product records, which suits research but leaves price, stock and variants to be parsed. See product search vs. web search.

Crawling deserves a note on legal risk. In March 2026 a district court enjoined Perplexity’s Comet agent from accessing Amazon; on August 4, 2026 the Ninth Circuit vacated that injunction, finding Amazon unlikely to succeed on its federal computer-fraud claim. The case continues, and terms-of-service and contract claims remain open questions. Prefer authorized data sources and identify your agent with Web Bot Auth when you do browse.

MCP servers

MCP is the standard way to give an LLM tools. It has been stewarded by the Linux Foundation’s Agentic AI Foundation since December 2025. For commerce:

  • Agent builders can consume existing MCP servers for catalog search, cart, checkout, and order status (Shopify publishes Cart, Checkout, and Order MCP servers; several product data providers publish search servers).
  • Browser agents can use WebMCP, a proposed standard for structured in-page tools. On September 28, 2026 Shopify added get_checkout, update_checkout, and complete_checkout WebMCP tools for eligible storefronts, with orders placed only after the buyer authorizes.
  • Merchants and platforms can expose their own MCP server. UCP defines an MCP transport binding alongside REST, A2A, and embedded bindings, so an MCP server can be a conformant UCP endpoint.
  • Keep tool schemas tight: typed parameters, enumerated values, and explicit units reduce hallucinated arguments.

Implementing checkout: ACP and UCP

Both protocols model checkout as a stateful session the agent creates and updates until it is ready to complete.

ACP

ACP is maintained by OpenAI and Stripe. The current stable spec (2026-04-17) covers cart, feed, orders, authentication, and MCP. Merchants implement a Checkout API (create, update, complete, and cancel checkout_sessions) and accept delegated payment credentials via the Delegate Payment API. OpenAI ended native Instant Checkout in ChatGPT in March 2026; ChatGPT now uses ACP mainly for product discovery feeds, with purchases completed on retailer sites or in retailer apps inside ChatGPT. ACP itself continues as an open spec.

UCP

UCP, co-developed by Google and Shopify, uses capability negotiation. A business publishes a profile at /.well-known/ucp listing capabilities such as dev.ucp.shopping.checkout, with extensions like dev.ucp.shopping.fulfillment and dev.ucp.shopping.discount. Agent and merchant agree on the highest mutually supported date-versioned capability. Payment handlers declare which instruments are accepted. Google uses UCP for native checkout in AI Mode and Gemini; Shopify uses it across its agent tools.

Practical guidance

  • Build a protocol-neutral internal checkout model and write thin ACP and UCP adapters on top.
  • Return complete totals (tax, shipping, discounts) before asking for payment; mismatches are the most common cause of failed agent orders.
  • Support a continue_url-style hand-off so the user can finish on the merchant site when native completion is not possible.
  • Implement order webhooks for fulfillment, returns, and refunds from day one.

Payment tokens

Never let the model see raw card numbers. Current options:

  • Stripe Shared Payment Tokens (SPTs): an agent grants a seller a token scoped by currency, maximum amount, and expiry; the seller confirms a PaymentIntent with it. Since March 2026 Stripe has said SPTs support Visa and Mastercard agentic tokens and BNPL from Affirm and Klarna.
  • Network agentic tokens: Visa Intelligent Commerce and Mastercard Agent Pay issue tokens bound to an agent and consumer consent.
  • AP2 mandates: signed Intent, Cart, and Payment Mandates create an auditable record of what the user approved.
  • Machine payments: x402 and Stripe’s Machine Payments Protocol for pay-per-call APIs.

See payments and trust.

Testing and evals

Shopping agents fail quietly: a plausible but wrong variant, an expired price, a missed constraint. Build evals that measure:

  • Constraint satisfaction: did every recommended item meet price, size, and availability requirements?
  • Grounding: are all claims traceable to retrieved product data?
  • Checkout success rate against sandbox merchants, including tax and shipping edge cases.
  • Refusal and confirmation behavior: does the agent stop and ask before spending?

Use test modes (Stripe test helpers can simulate granted SPTs) and maintain a regression set of real user queries.

Security: prompt injection

Product pages, reviews, and merchant descriptions are untrusted input. An indirect prompt injection hidden in a listing can try to redirect a purchase or exfiltrate data. OWASP’s guidance applies directly: constrain the model’s role, validate outputs, enforce least privilege on tools, require human approval for high-risk actions, segregate untrusted content, and red-team regularly. Concretely, separate the browsing context from the payment context, enforce spending limits in code, and log every tool call. See agent identity and fraud.

Prioritized checklist

Now

  • Choose product data sources and measure freshness and coverage.
  • Put hard spending limits and confirmation steps in code.
  • Add prompt-injection test cases to your eval suite.

Next

  • Implement ACP and UCP checkout adapters behind one internal model.
  • Integrate a scoped payment token (SPT or network token).
  • Sign agent traffic with Web Bot Auth.

Later

  • Support AP2 mandates for delegated, human-not-present purchases.
  • Add order management, returns, and account linking.
  • Expose your own MCP server for partners.

Common mistakes

  • Letting the LLM compute totals or apply discounts instead of the merchant’s checkout API.
  • Relying solely on scraped data without freshness checks.
  • Giving one agent both untrusted browsing and payment authority.
  • Hard-coding one protocol when merchants are split across ACP and UCP.

Sources

The newsletter

Agentic commerce, explained as it happens.

New protocols, launches and what they mean for you. Plain language, no hype.

I'm a…