How AI Shopping Agents Use UCP to Buy Products
A plain-English walkthrough of exactly what happens when an AI agent uses UCP to discover, evaluate, and purchase a product on your behalf.
The Shopping Problem That AI Agents Have Always Had
Ask an AI assistant to find you running shoes under $120, size 10, available by Thursday. A good AI can do the research. It can find options, compare reviews, check sizing guides.
Then it hits the same wall every time: it cannot actually buy anything. It sends you to a browser tab. You re-enter your address, your card number, and your email. The agent did the hard part and you do the tedious part.
UCP removes that wall.
This article explains exactly how that works. Not a high-level overview but the specific steps an agent takes when it uses UCP to buy something on your behalf.
What Makes UCP Different From "Just Using an API"
Most AI integrations with shopping work through retailer-specific APIs. Amazon has one. Target has one. Each requires its own authentication, its own data format, its own checkout flow. An agent that supports five retailers has five integrations to maintain.
UCP is a single protocol that every participating merchant speaks. An agent that implements UCP once can shop at thousands of merchants. The agent does not need to know whether it is talking to a Shopify store or a PrestaShop site or a custom-built storefront. They all speak the same language.
Step 1: Discovery
Before an agent can buy from a merchant, it needs to know the merchant exists and supports UCP.
UCP uses a discovery mechanism borrowed from web standards. Every UCP-enabled merchant hosts a file at a predictable URL: /.well-known/ucp. Think of it like robots.txt, but for commerce agents.
The manifest at that URL contains:
- The merchant's name and description
- What product categories they carry
- Which UCP capabilities they support
- Where their UCP endpoint is
- Which payment methods they accept
An agent can read this file and immediately understand how to interact with the merchant. No documentation, no API key request, no partnership email.
Example manifest (simplified):
{
"name": "Allbirds",
"description": "Sustainable footwear and apparel",
"mcp_endpoint": "https://allbirds.com/api/ucp/mcp",
"capabilities": ["product_discovery", "checkout", "order_management"],
"payment_handlers": ["com.google.pay", "com.stripe"]
}Agents can also discover merchants through registries like Google Shopping's UCP layer. An agent looking for running shoes can query the registry, get back a list of merchants that carry running shoes and support UCP, and then read each merchant's manifest to understand their capabilities.
Step 2: Catalog Query
The agent connects to the merchant's UCP endpoint and asks about products. In UCP, this happens through an MCP (Model Context Protocol) connection that exposes tools the agent can call.
The agent calls search_products with the consumer's requirements:
{
"query": "running shoes",
"max_price": 12000,
"filters": { "gender": "mens", "size": "10" }
}Note the price is in cents. UCP uses integer amounts in the smallest currency unit to avoid floating-point issues.
The merchant returns structured product data:
[
{
"id": "tree-runner-go-blk-10",
"title": "Tree Runner Go",
"price": { "amount": 9500, "currency": "USD" },
"variant": { "color": "Black", "size": "10" },
"available": true,
"shipping_estimate": "2026-06-04"
}
]The agent can query multiple merchants simultaneously. It might check three or four merchants at once, compare prices, verify availability, and evaluate shipping estimates before presenting anything to the consumer.
Step 3: Consumer Review
The agent does not buy anything without showing you first.
This is a core design principle of UCP: agents propose, humans approve. The agent collects options, applies your preferences, and presents a recommendation. You see the product, the price, the shipping estimate, and the payment method that will be charged.
You confirm with a single tap. Or you tell the agent to look at other options. Or you say no.
This confirmation step is not optional. It is built into the protocol. An agent that skips it is not compliant with UCP.
Step 4: Identity and Payment Token
When you confirm, the agent's platform generates a one-time payment token. This is the part that is hardest to explain simply.
Here is the key thing: the token is not your card number. It is a short-lived credential that says "Anthropic (or Google, or whoever runs your agent) has verified this consumer and authorizes a payment of $95.00 to Allbirds."
Your card number never leaves your payment provider. Allbirds never sees it. The agent never sees it. The token is issued, used once for this specific transaction, and then it is gone.
This is what makes UCP secure despite involving a third party in the purchase. The agent acts on your behalf, but it never gets the keys to your money.
Step 5: Checkout
The agent calls create_checkout with the item and the payment token:
{
"items": [{ "product_id": "tree-runner-go-blk-10", "quantity": 1 }],
"identity_token": "eyJhbGci...",
"shipping_address": "pre-configured"
}Your shipping address is pre-configured in your agent profile. The merchant uses it directly. No form to fill in.
The merchant receives the checkout request, validates inventory, and resolves the payment token with the payment handler (Stripe, PayPal, etc.). If everything clears, an order is created and a confirmation is sent back.
The agent relays the confirmation to you: order number, estimated delivery, the specific item ordered. Done.
Step 6: Order Management
After purchase, the agent can check order status and handle post-purchase tasks through UCP's order management endpoints.
// Agent queries order status
{ "action": "get_order_status", "order_id": "ORD-394821" }
// Merchant returns
{ "status": "shipped", "tracking": "1Z999AA1...", "eta": "2026-06-04" }If the item arrives and does not fit, the agent can initiate a return through the same endpoint. The return flow is handled entirely within UCP. No website to navigate, no form to fill in.
The Full Picture
Here is the complete sequence in plain terms:
- You tell your agent what you want
- The agent queries multiple merchant catalogs simultaneously
- The agent presents the best option and asks for your confirmation
- You confirm; a one-time payment token is generated
- The agent passes the token and your preferences to the merchant's checkout endpoint
- The merchant processes the order and ships it
- The agent monitors delivery and can handle returns if needed
The whole flow takes seconds from confirmation to order placed. No passwords, no checkout forms, no credit card numbers flying around.
For Developers
If you are building an agent, the UCPList directory lists every known UCP-enabled merchant, platform, and payment handler. The developer tools category has the SDKs and conformance test suite you need.
The implement UCP checkout guide covers the merchant side. The build an AI shopping agent guide covers the agent side.
Both sides of the UCP transaction are well-documented. The protocol is open source. The tooling is production-ready. If you are building commerce into an AI product, this is where to start.
Read next
How UCP secures agent-initiated commerce. Payment token scoping, identity verification, merchant validation, and what can go wrong in agent checkout flows.
The best UCP-enabled stores to integrate with if you're building an AI shopping agent. Real endpoints, real data, no announced-only fluff.
The mechanics behind agent-driven merchant discovery: how UCP manifests work, how trust signals get built, and why verified listings matter for both agents and merchants.