# How to make checkout work for AI shopping agents

> A step-by-step guide to the shopping journey for AI agents: finding products, choosing options, adding to cart, checkout and the payment handoff.

Published October 8, 2026 by Ghost Agent Labs · Task completion · https://ghostagentlab.com/articles/agent-ready-checkout/

## Key takeaways

- Agents must find a product, choose options, add to cart and check out, and every step is a place a sale can be lost.
- Custom size and color pickers are where agents most often fail on good sites, and forcing account creation stops many agents completely.
- Walk your checkout from home page to payment using only the keyboard, and retest after every theme update or new app.

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.

1. Find the product
   
   Hover-only menus, and search that only works with scripts
2. Choose options Most common failure
   
   Custom size and color swatches with no names or roles
3. Add to cart
   
   A button covered by a banner, or no text confirming the add
4. The cart
   
   Quantity and remove buttons shown only as icons
5. Checkout
   
   Forced accounts, unlabelled fields and a CAPTCHA on every order
6. Payment Handed to the person
   
   The agent hands back to the person; a cart that empties during the handoff loses the sale

*The six steps an agent works through for a shopper, and what most often stops it at each. Choosing options is where agents most often fail on otherwise good sites.*

## 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](https://ghostagentlab.com/articles/agent-friendly-buttons-forms/).
- **Product pages describe the product.** Name, price, stock and key specifications in the HTML, with structured data. See [product data agents can read](https://ghostagentlab.com/articles/structured-data-ai-shopping-agents/).

## 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`, `email` and `tel` tell 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](https://ghostagentlab.com/articles/bot-protection-ai-agents/).

## 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

1. **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.
2. **Run [AgentScore](https://ghostagentlab.com/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.
3. **Monitor it with [Ghost Agents](https://ghostagentlab.com/ghost-agent/).** 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.

## Sources and further reading

- [Agentic Commerce Protocol](https://developers.openai.com/commerce) (OpenAI)
- [Google Universal Commerce Protocol (UCP) Guide](https://developers.google.com/merchant/ucp) (Google for Developers)
- [HTML Standard: Form control infrastructure (autofill)](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html) (WHATWG)
