How to make checkout work for AI shopping agents
Usually fixed by: E-commerce platform admin · Typical effort: days
When a person asks an AI assistant to buy something, the agent has to do everything a shopper does: find the product, choose the right options, add it to the cart, and get through checkout. Each step is a place it can get stuck, and a stuck agent is a lost sale. This guide walks the journey step by step.
How agents shop today
Agents buy in two ways, and you'll want to support both:
- Through your website. A browser agent uses your site the way a person would, and typically hands control back to the person to sign in or pay. This works today on any site, as long as the agent can get through.
- Through an agentic commerce protocol. The assistant completes the purchase through a direct integration, without driving your web pages. Examples include the Agentic Commerce Protocol used by ChatGPT and Google's Universal Commerce Protocol. Support usually comes through your commerce platform or payment provider.
Protocols are growing fast, but for now most agents still shop through the website. That's the journey this guide covers.
Step 1: Find the product
- Search works without JavaScript tricks. A real search form with a labelled field and a submit button, whose results have their own URL (like
/search?q=decaf), lets agents search directly. - Categories are real links. Category and product links should be ordinary
<a href>links in the HTML, reachable without hover menus. See buttons, links and forms agents can use. - Product pages describe the product. Name, price, stock and key specifications in the HTML, with structured data. See product data agents can read.
Step 2: Choose options
This is where agents most often fail on otherwise good sites. Size, color and quantity pickers are frequently custom-built swatches that look fine to people but have no names or roles agents can read.
- Use native
<select>elements or radio buttons, or give custom swatches a role and a name, for example a radio group with each option labelled "Size 10" or "Color: Navy". - Show unavailable options as disabled, with text saying why ("Out of stock"), not just a faded color.
- Update price and stock text on the page when an option changes, so the agent can confirm it picked correctly.
- Give each variant its own URL where possible (
?variant=…), so an agent can link straight to the exact item.
Step 3: Add to cart
- The add-to-cart control is a real
<button>with clear text, and nothing covers it, such as a cookie banner or chat widget. - Confirm the add in text: "Added to cart: Ethiopia Yirgacheffe, 340 g" with a link to the cart. An animation alone leaves the agent unsure whether it worked.
- If a cart drawer slides out, make sure it has a labelled close button and a real link to the cart page.
- Skip upsell pop-ups at this step, or make them easy to dismiss with a labelled button.
Step 4: The cart
- The cart lives at a stable URL, such as
/cart, that agents can open directly. - Line items, quantities, subtotal and any discounts are shown as text.
- Quantity controls and remove buttons have names ("Remove Ethiopia Yirgacheffe"), not just "×" or a trash icon.
- The checkout button is a clearly named button or link, visible without scrolling past recommendations.
Step 5: Checkout
- Offer guest checkout. Forcing account creation is a dead end for many agents. Offer sign-in as an option, not a gate.
- Label every field and use autocomplete.
autocomplete="shipping street-address",postal-code,emailandteltell an agent exactly where each detail goes. - Make shipping options readable. Each option's name, price and delivery estimate as text, with a real radio button to choose it.
- Write errors as text. "Enter a 5-digit ZIP code", next to the field, rather than a red outline.
- Show the full total before payment, including shipping and tax, so the agent can confirm it with the person before they pay.
- Avoid a CAPTCHA on every checkout. Use risk-based checks that only challenge suspicious orders. See bot protection and CAPTCHAs.
Step 6: Payment
Most agents stop at payment and hand back to the person, and that's how it should be. Make the handoff smooth: a clear payment step, wallet options like Apple Pay, Google Pay or Shop Pay that a person can approve in one tap, and a cart that survives the handoff instead of emptying after a short timeout.
To let assistants complete purchases on their own, ask your commerce platform or payment provider which agentic commerce protocols it supports. AgentScore checks whether your site advertises one.
How to test your checkout
- Walk it with the keyboard only. From the home page to the payment step, without a mouse. Anywhere you get stuck, an agent probably does too.
- Run AgentScore. For online stores, it checks that AI agents can open your product, cart and checkout pages, find and press the add-to-cart button, and fill in labelled checkout fields, and that there's a guest checkout. It doesn't run a full journey itself.
- Monitor it with Ghost Agents. They run the whole journey on a schedule with test details you provide, and alert you when it breaks. They stop when they reach a payment form, never enter card details, and refuse buttons that place orders, so testing never creates a real order.
Retest after every change. Checkout breaks for agents in the same ways it breaks for people: a theme update, a new app, a redesigned size picker. The difference is that agents don't email support. They just buy elsewhere.