Is Your Store Ready for AI Shopping Agents? Checkout Test Plan
Getting your products into ChatGPT or Google's AI shopping is the easy part. Getting AI agents through your checkout without errors is the hard part. This prompt builds a full test plan so agent orders don't fail, double up or get blocked.
Example input
This is exactly what we gave the model. You replace it with your own details.
- Store URL: https://www.example.com (online electronics accessories store) - Platform: Custom Node.js store - Protocol or channel we plan to connect: OpenAI Agentic Commerce Protocol (ACP) first, then Google Universal Commerce Protocol (UCP) - Product count and data sources: 4,200 SKUs; product data in the store database, Google Merchant Center feed updated every 24 hours, stock from a warehouse system that syncs every 2 hours - Payment provider: Stripe - Bot protection or rate limits in place: Cloudflare Bot Fight Mode and a rate limit of 100 requests per minute per IP on /api/ - Known problems with stock or prices: Prices in Merchant Center sometimes lag the site by a day during sales. Fast sellers sometimes show 'In stock' when the warehouse has none. Our checkout API sometimes times out under load.
Real output
Pasted straight from the model. We did not fix a word.
Agent Commerce Readiness Test Plan: example.com (ACP first, then UCP)
Confirm current requirements before you build. ACP and UCP are new and change often: field names, required endpoints, order status values, timeouts, feed refresh limits, signing rules, merchant approval, and even how checkout is hosted. Everything protocol-specific below is based on my understanding of the specs. Check it against the official sources before you write code: OpenAI's ACP developer docs and the public ACP spec, Stripe's agentic commerce docs, and Google's UCP spec plus Merchant Center help. Write down the spec version you build against, and check it again the week you go live.
Missing details: my guesses (correct me if any are wrong)
| # | Question | My best guess (used in this plan) |
|---|---|---|
| 1 | Which countries, currency and tax tool? | Guess: US only, USD, with sales tax worked out at checkout by Stripe Tax or a tax API. |
| 2 | Which Cloudflare plan? | Guess: the Free plan, because "Bot Fight Mode" is the Free-plan feature. Paid plans use "Super Bot Fight Mode". |
| 3 | Can the warehouse system return live stock for each SKU (by API or webhook)? | Guess: yes, it has an API, but today you only use the 2-hour batch sync. |
| 4 | Database, hosting and staging? | Guess: PostgreSQL, a few Node.js instances behind Cloudflare, and a staging copy that uses Stripe test mode. |
| 5 | How do refunds and returns work today? | Guess: staff refund from your admin panel, which calls Stripe. The order status changes only inside your database, and nothing is sent to any outside system. |
Other guesses:
- The owners in the tables are roles, not names: Backend lead, DevOps, Catalog manager, QA, Support lead, Finance.
- "Peak" means 3× your highest checkout rate on record. If you don't know that number, use 60 completed checkouts and 600 checkout API calls per minute.
- All the numeric targets (latency, mismatch %, alert levels) are starting points for you to tune.
1. Test case table
Test tools you need:
- An agent simulator: a small Node script that signs and sends requests the way the agent platform does, using the headers, signature and idempotency key in the spec.
- k6 or Artillery for load.
- A reconciliation SQL job that compares orders, Stripe PaymentIntents and stock.
Run everything in staging with Stripe test mode, and use the platform's sandbox if it offers one.
The Pass rule column covers both how to measure and the pass/fail line.
| ID | Check | Steps | Expected result | Pass rule | Owner |
|---|---|---|---|---|---|
| CL-01 | 1. Checkout load: single-session baseline | Run 50 full agent flows, one at a time: create session → add address → choose shipping → complete. | Every call returns valid protocol JSON, with no errors. | Measure: APM traces (OpenTelemetry/Datadog). Pass: 0 errors. p95 ≤ 800 ms for create/update and ≤ 2 s for complete (guess targets; keep them well under the platform timeout given in the docs). | Backend lead |
| CL-02 | 1. Parallel agent burst | 200 sessions start within 10 s from only 3 source IPs, because agents share IPs. Each sends create + 3 quick updates + complete with no pause between calls. Ramp up to peak and hold for 15 min. | No timeouts, no 5xx errors, no 429s for signed agent traffic. | Measure: k6 report + server logs. Pass: error rate < 0.5%, 0 timeouts on complete, p95 within the CL-01 targets. | DevOps |
| CL-03 | 1. Slow dependency under load | While CL-02 runs, add a 5 s delay to the warehouse, tax and Stripe mocks, one at a time. | The API quickly returns a clear, defined error instead of hanging. Nothing is left half-created. | Measure: reconciliation job. Pass: 0 orders without a payment, 0 payments without an order, 0 requests open longer than 10 s. | Backend lead |
| CL-04 | 1. Soak test | Run at 1× peak for 4 hours. | Memory, DB connection pool and latency stay stable. | Measure: APM + DB pool metrics. Pass: p95 rises less than 20%, 0 "pool exhausted" errors, memory does not keep growing. | DevOps |
| CL-05 | 1. Hot-SKU race | Set one SKU to 10 units. Send 100 parallel completes, each for qty 1. | Exactly 10 orders. The other 90 calls get an out-of-stock message. | Measure: orders + stock tables. Pass: 10 orders, stock = 0, stock never below 0. | Backend lead |
| DM-01 | 2. Full catalog diff | For all 4,200 SKUs, pull data from the DB, the live product page (visible price + JSON-LD), the ACP product feed, Merchant Center (via Merchant API) and a checkout "create session" call. Compare price, sale price, currency, SKU/ID, GTIN and availability. | All sources match. | Measure: diff report (CSV). Pass: 0 price mismatches, 0 ID mismatches, and stock-status mismatches ≤ 0.5%, all within the allowed feed delay. | Catalog manager |
| DM-02 | 2. Sale start | Schedule a 20% sale on 50 SKUs in staging. Record when each source shows the new price. | Site and checkout change at the start time. Feeds change within the target window. | Measure: timestamp for each source. Pass: all sources updated within ≤ 15 min (target after the fixes). Checkout never charges more than the feed shows. | Catalog manager |
| DM-03 | 2. Sale end (highest price risk) | End the sale on the same 50 SKUs. The simulator reads the feed price, then creates a checkout. | No source still shows the old, lower price after checkout has gone up. If one does, checkout honors the lower price. | Measure: timestamps + checkout responses. Pass: 0 cases where the feed price is lower than the price checkout charges. | Catalog manager |
| DM-04 | 2. ID and variant mapping | For every item ID in the ACP feed, create a checkout session. Include all variants (color, cable length, connector type). | Every ID is accepted and maps to the right variant and price. | Measure: script log. Pass: 100% of IDs accepted, 0 wrong variants. | Backend lead |
| DM-05 | 2. Page data agents read | Crawl all product pages with JavaScript off. Read the JSON-LD Offer price, availability and priceValidUntil. | Values match the DB. | Measure: crawl report + Cloudflare logs for verified crawlers. Pass: 0 mismatches, 100% of pages return 200. | Catalog manager |
| IS-01 | 3. "Ghost stock" on a fast seller | Set warehouse stock to 0 but leave the store DB at 5, copying the 2-hour gap. The agent creates and completes a session. | Checkout checks live sellable stock and returns out-of-stock. No charge. | Measure: orders table + Stripe test dashboard. Pass: 0 orders, 0 charges. | Backend lead |
| IS-02 | 3. Feed vs checkout vs warehouse (live sample) | For 48 hours, every 15 min, sample 200 SKUs: your top 100 fast sellers + 100 random. Compare feed availability, the checkout response and warehouse on-hand stock. | All three agree. | Measure: sampling job. Pass: ≤ 0.5% disagree, and 0 cases of "feed says in stock, warehouse has 0" lasting longer than one feed cycle. | Catalog manager |
| IS-03 | 3. Reservation release | Create a session for qty 2. Then (a) abandon it, (b) cancel it. | Reserved units come back: (a) when the reservation times out, (b) at once. | Measure: stock table. Pass: stock is back to its start value within the timeout + 1 min. | Backend lead |
| IS-04 | 3. Last unit, two channels | A human checkout on the site and an agent checkout try to buy the last unit in the same second. Repeat 20 times. | One wins. The other gets a clear out-of-stock message. | Measure: orders table. Pass: exactly 1 order in every run. | QA |
| IS-05 | 3. Order reaches the warehouse | Complete 20 agent orders. | Each order reaches the warehouse system and lowers its stock. | Measure: warehouse log. Pass: 100% arrive within 5 min, with the order source tagged "ACP". | DevOps |
| RS-01 | 4. Same key, fast replay | Send "complete" twice with the same Idempotency-Key, 0 ms apart and again 2 s apart. Repeat 50 times. | One order and one PaymentIntent. The second reply equals the first, or is the spec's defined "in progress" reply. | Measure: orders table + Stripe. Pass: 0 duplicate orders, 0 duplicate charges. | Backend lead |
| RS-02 | 4. Retry after a timeout | The client gives up after 1 s while the server takes 3 s. The client retries with the same key. | The retry gets the real result of the first call. | Measure: reconciliation job. Pass: 1 order and 1 charge in all 50 runs. | Backend lead |
| RS-03 | 4. Same key, different body | Reuse a key with a different quantity. | Rejected with the error the spec defines. Nothing is created. | Measure: simulator log. Pass: 100% rejected. | QA |
| RS-04 | 4. Crash between charge and save | Kill the Node process right after Stripe confirms payment and before the order is saved. Restart and retry. | The Stripe idempotency key (built from the session ID) returns the same PaymentIntent. The order is saved once. | Measure: Stripe dashboard + orders table. Pass: 1 charge, and the order is reconciled within 5 min. | Backend lead |
| RS-05 | 4. Duplicate webhooks | Send the same Stripe payment_intent.succeeded event 3 times and out of order. Also send one of your own order events to the agent mock twice. | Each event is processed once. | Measure: event log. Pass: 1 state change, 1 email, 1 warehouse push. | Backend lead |
| RS-06 | 4. Cancel sent twice | Send "cancel" twice for the same session. | The second call returns the same canceled state. | Measure: simulator log + stock table. Pass: no error, and stock is released only once. | QA |
| RR-01 | 5. Full refund | Refund a completed agent order from the admin panel. | The Stripe refund succeeds on the first try, the order becomes "refunded", the order-update webhook goes to the agent platform, and the customer gets an email. | Measure: Stripe + outbound webhook log. Pass: 100% succeed on the first try, and the agent platform returns 2xx within ≤ 5 min. | Support lead |
| RR-02 | 5. Partial refund | Refund 1 of 3 items. | Amount = the item + its tax (+ shipping if your policy says so). A "partially refunded" status goes to the agent. | Measure: Stripe + order record. Pass: amount right to the cent, status correct. | Finance |
| RR-03 | 5. Agent endpoint down | The agent webhook mock returns 500 for 2 hours. | Your system retries with backoff, raises an alert, and delivers once the endpoint is back. | Measure: outbox table + alert log. Pass: 0 lost events, and an alert within ≤ 15 min. | DevOps |
| RR-04 | 5. Refund clicked twice | Click refund twice quickly, or retry the API call. | Only one refund, because the Stripe refund call has an idempotency key. | Measure: Stripe dashboard. Pass: exactly 1 refund. | Backend lead |
| RR-05 | 5. Refund fails later | Use Stripe's test card whose refund fails after it is created (see Stripe's testing docs). | The order shows "refund failed", support is alerted, and the agent is not told "refunded". | Measure: order status + alert log. Pass: alert within ≤ 15 min, correct status. | Finance |
| RR-06 | 5. Return of an opened item | A customer starts a return for an opened cable or charger. | Return instructions are sent. Status changes (requested → received → refunded) reach the agent, if the protocol supports those statuses. | Measure: webhook log + email log. Pass: every status change is sent, and the outcome follows your written policy. | Support lead |
| RR-07 | 5. Cancel before shipping | Cancel an order before it is picked. | The authorization is voided (or the charge refunded), stock is released, and the agent is told. | Measure: Stripe + stock + webhook log. Pass: all three happen within 5 min. | Backend lead |
| BR-01 | 6. Signed agent through Cloudflare | From a cloud server (and the platform sandbox, if there is one), send valid signed agent calls at 300 requests/min from one IP. | No Cloudflare challenge, no 403, no 429. | Measure: Cloudflare Security Events + simulator log. Pass: 0 blocks or challenges. This will probably fail today (see F5). | DevOps |
| BR-02 | 6. Many shoppers, one IP | Simulate 50 shoppers in 1 min through one agent IP (about 400 requests). | The agent limit (counted per agent credential) applies, not the 100/min per-IP rule. | Measure: Cloudflare + app rate-limit logs. Pass: 0 429s below the agent limit. Above it, 429 with Retry-After and a JSON body, not an HTML page. | DevOps |
| BR-03 | 6. Fake agent | Send calls with an agent-style User-Agent but a bad or missing signature, from a random IP. Also replay an old signed request with an old timestamp. | All are rejected. | Measure: app auth log. Pass: 100% rejected (401/403), 0 sessions created. | Backend lead |
| BR-04 | 6. Normal protection still works | Run a scraper and a login-attack script against the site. | Still blocked or challenged, the same as today. | Measure: Cloudflare Security Events. Pass: block rate no lower than before the change. | DevOps |
| BR-05 | 6. Discovery crawlers allowed | Check robots.txt and Cloudflare's AI-bot blocking setting. Review the logs for OAI-SearchBot and Googlebot on product and policy pages. | Verified crawlers can read product and policy pages. | Measure: Cloudflare logs. Pass: 200 responses, 0 blocks of verified crawlers. | DevOps |
| SH-01 | 7. Leave and come back | Create a session and add an address. Wait 30 min, retrieve the session, then complete it. | The session is still valid with fresh totals, or returns a clear "expired" message. | Measure: simulator log. Pass: it completes, or returns a specific message. Never a bare 500 or 404. | Backend lead |
| SH-02 | 7. Deploy during checkout | Start 50 sessions, restart all Node instances, then finish them. | Session state lives in the DB or Redis, not in process memory. | Measure: simulator log. Pass: 50 of 50 complete. | DevOps |
| SH-03 | 7. Price or stock changes while away | Between "update" and "complete", change the price and set stock to 1. | Before any charge, checkout returns the new totals with a message. | Measure: Stripe amount vs. the last total sent to the agent. Pass: 0 charges that differ from the last total the agent was shown. | Backend lead |
| SH-04 | 7. Expired session | Try to complete after the session has expired. | A clear error, no charge, and the reservation is released. | Measure: Stripe + stock table. Pass: 0 charges, stock released. | QA |
| SX-01 | 8. Shipping costs and delivery times | Create sessions for 8 addresses: 4 normal US states, Alaska, Hawaii, a PO box, an APO, and one non-US address. | Every option has a name, a price and a delivery date range. Unsupported addresses get a clear message. | Measure: compare with site checkout for the same cart. Pass: 100% of options have a cost and dates that match the site, and dates respect the warehouse cut-off time. | Backend lead |
| SX-02 | 8. Taxes | Run 100 carts across 6 states, including one with no sales tax. Change the address in the middle of a session. | Tax matches site checkout to the cent, shows as its own line, and is recalculated when the address changes. | Measure: diff script. Pass: 0 cent differences. | Finance |
| SX-03 | 8. Return policy the agent can read | Fetch the return policy and terms URLs given in the feed and session, with JavaScript off, through Cloudflare. | Plain HTML text giving the return window in days, the rule for opened vs. sealed items, who pays return shipping, the process for faulty items, and any restocking fee. The window matches the feed. | Measure: fetch script + manual read. Pass: 200 response, readable text, 0 differences from the feed values. | Catalog manager |
| SX-04 | 8. Payment authorization and failure messages | Use Stripe test cards/tokens for a generic decline, insufficient funds, an expired card, 3DS required, and a Radar block. | Each case returns a specific protocol error and a plain-English message. No order is created. Stock stays reserved briefly so the buyer can retry. | Measure: simulator log. Pass: 100% of cases mapped, 0 orders, 0 "unknown error" replies. | Backend lead |
| SX-05 | 8. Authorized amount is exact | Compare the Stripe amount with the session total (items + shipping + tax − discounts) on 100 orders. Also send a total above the delegated payment token's limit. | Exact match. An over-limit total gets a clear error. | Measure: reconciliation job. Pass: 0 cent differences, over-limit always rejected. | Finance |
| SX-06 | 8. Confirmation goes to the real customer | Complete 20 orders with test buyer emails. | The email goes to the buyer's address from the session (not to the agent platform). It includes the order number, items, total, delivery dates, return policy link and support contact. The agent gets the order ID and link by webhook. | Measure: email provider logs + inbox check. Pass: 100% delivered within ≤ 2 min, SPF/DKIM pass, content correct. | Support lead |
2. Risk ranking table
These are ranked by how much money or trust a failure would cost with your setup.
| Rank | Risk | Why it is likely for you | Tests | Likelihood | Cost if it happens | Priority |
|---|---|---|---|---|---|---|
| 1 | Agent calls blocked by Cloudflare | Bot Fight Mode challenges automated traffic, and Cloudflare's docs say it can't be skipped with WAF rules (confirm for your plan). Your 100/min per-IP limit on /api/ will also throttle agents, because many shoppers arrive from a few shared agent IPs. | BR-01, BR-02 | Very high (near certain) | The channel earns $0, or checkouts fail halfway, which looks broken to the platform. | Fix before you connect |
| 2 | Duplicate orders or double charges | Your checkout API already times out under load. Timeouts make agents retry, and without idempotency every retry can become a new order. | RS-01 to RS-06, CL-02, CL-03 | High | Refunds, dispute fees, chargebacks, and lost trust with customers and the platform. | Critical |
| 3 | Overselling fast sellers | Stock syncs only every 2 hours, fast sellers already show "In stock" at 0, and agents buy in parallel and fast. | IS-01 to IS-04, CL-05 | High | Cancellations, refunds, bad reviews. Platforms may limit merchants with high cancellation rates (guess; check the platform rules). | Critical |
| 4 | Wrong prices during sales | Merchant Center lags the site by a day during sales. The ACP feed may lag too. The shopper sees one price and checkout charges another. | DM-01 to DM-03, SH-03 | High (every sale) | Item disapprovals or account warnings in Merchant Center, angry shoppers, and false-advertising risk. This blocks UCP, because Google's agent surfaces run on Merchant Center data. | Critical |
| 5 | Checkout timeouts lose sales | This is a known issue. Agents send fast bursts of calls, which is worse than human traffic. | CL-01 to CL-04 | High | Abandoned checkouts, and the platform may rank your offers lower (guess). | High |
| 6 | Refund fails, or the refund status never reaches the agent | Today refund status stays inside your database (guess). | RR-01 to RR-07 | Medium | The customer thinks they were not refunded and opens a dispute. | High |
| 7 | Card testing through agent checkout | Any new payment endpoint attracts fraud bots if it is not locked down. | BR-03, SX-04 | Medium | Stripe fees, Radar flags, account risk. | High (keep controls on) |
| 8 | Session lost after a deploy or restart | Session storage is unknown. Node apps often keep it in memory. | SH-01 to SH-04 | Medium | Lost orders, and agents retrying in a loop. | Medium |
| 9 | Shipping or tax totals differ from the site | There may be two code paths (site checkout and agent checkout). | SX-01, SX-02 | Medium | Under-collected tax is your cost. Different totals hurt trust. | Medium |
| 10 | Confirmation email doesn't reach the real buyer | Agent flows pass the buyer's details differently from your site forms. | SX-06 | Low to medium | "Where is my order?" tickets and disputes. | Medium |
3. Fix list
F0. Build one "agent checkout core" and add thin protocol adapters. Put stock reservation, pricing, tax, shipping, idempotency and the order-event outbox in one internal Node service. Then write a small ACP adapter now and a UCP adapter later. You fix each problem once, and both protocols get the fix.
F1. Idempotency from start to finish (fixes risk 2).
- Create an
idempotency_keystable with a UNIQUE constraint on(agent_id, key). It stores a hash of the request, a status (in_progress/done) and the saved response.- First call: insert the row, then process.
- Duplicate while still running: wait briefly, or return the reply the spec defines for "in progress".
- Duplicate after it finished: return the saved response, byte for byte.
- Same key with a different body: reject.
- Keep keys for at least 24 hours.
- Pass a Stripe idempotency key built from the session ID (for example
complete_<checkout_session_id>) on every PaymentIntent create/confirm call. Then one session can never make two charges. Note that Stripe can delete keys after 24 hours, so also do the next point. - Add a UNIQUE constraint on
orders.checkout_session_id. - In Stripe webhook handling, store
event.idand skip events you have already seen. Do the slow work in a queue. - Run an hourly reconciliation job: Stripe charges vs. orders. Alert on any charge without an order, or more than one charge per session.
F2. Stop checkout timeouts (fixes risk 5, helps risk 2).
- Profile under the CL-02 load. Common causes in Node apps:
- outside calls made one after another (warehouse, tax, Stripe)
- an undersized DB connection pool
- event-loop blocking (big JSON work, sync crypto, sync logging)
- no timeouts on outbound HTTP
- Run independent checks in parallel (
Promise.allfor tax, shipping and stock). - Put a timeout (2–3 s, guess) and a circuit breaker on every outbound call. Cache shipping rate tables.
- Keep the "complete" path short: reserve stock → charge with Stripe → save order → reply. Move emails, warehouse push, analytics and agent webhooks to a queue (for example BullMQ on Redis) that runs after the reply.
- Run at least 2–3 app instances behind the load balancer, size the DB pool to match, and load-test again.
F3. One trusted stock number, and real reservations (fixes risk 3).
- Checkout must check sellable stock: warehouse on-hand − reserved − safety buffer. Do not use the 2-hour copy.
- If the warehouse API allows it (guess 3), get stock changes by webhook. Otherwise, poll it every 5 min for your top ~200 fast sellers, and call it live for each SKU at "complete".
- Reserve atomically:
UPDATE stock SET reserved = reserved + :qty WHERE sku = :sku AND on_hand - reserved - buffer >= :qty, and treat "0 rows changed" as out of stock. Tie the reservation timeout to the session's expiry, and release it on cancel. - Add a safety buffer for fast sellers: show them as out of stock in all feeds when sellable stock is ≤ 2–3 units. That number is a guess; tune it to each SKU's sales speed.
- Option for SKUs where stock is uncertain: authorize now, capture after the warehouse confirms the pick (Stripe manual capture). A stock miss then becomes a voided authorization, not a refund. Card authorizations expire in a few days (about 5–7, depending on the card network; check Stripe's docs). Guess: the delegated payment token supports manual capture. Confirm this in the ACP and Stripe docs.
F4. One source of truth for prices (fixes risk 4).
- Keep the price, and every scheduled sale (start and end times), in one table. The site, checkout, ACP feed and Merchant Center all read from it. Nobody edits prices by hand in Merchant Center or in feed tools.
- Send sales to Merchant Center in advance, using
sale_pricewithsale_price_effective_date. Google then knows the start and end times ahead of the sale. This directly fixes the one-day lag during sales. - Replace the 24-hour Merchant Center feed with Merchant API updates whenever a price or stock value changes. The Merchant API replaces the old Content API. Keep the full daily feed as a backup. Turn on Merchant Center's automatic item updates as a safety net (this needs correct JSON-LD, see DM-05).
- Build the ACP product feed from the same table, and send it as often as OpenAI allows. My understanding is as often as every 15 minutes; confirm this.
- Sale-end order: update the feeds first, then raise the price on the site and in checkout only after the feeds confirm. At sale start, do the reverse (site first, feeds after). That way no shopper ever sees a lower price than the one they are charged.
- Lock the price for the life of a checkout session. If the price must change, return the new totals with a message before charging (SH-03).
F5. Let verified agents in without weakening fraud protection (fixes risks 1 and 7).
-
Do not turn off Bot Fight Mode for the whole site, and never allow traffic because of a User-Agent string. Both are easy to fake.
-
Put the agent endpoints on their own path or hostname (for example
/agent/acp/...), separate from your normal/api/. -
Choose one way past Bot Fight Mode:
- Option A (preferred): move to a Cloudflare plan with Super Bot Fight Mode. Add a WAF skip rule that covers only the agent path and only traffic that comes from the platform's published IP ranges or Cloudflare's verified bot / signed agent categories. Every other path keeps full bot protection.
- Option B: serve the agent API from a separate Cloudflare zone (its own domain) without Bot Fight Mode. Use WAF rules that allow only the platform's IP ranges and block everything else.
-
Verify every request in your app, whichever option you choose:
- check the protocol's bearer token or API key
- check the request signature
- reject timestamps older than about 5 minutes, which blocks replays
- reject reused request IDs
- get the exact headers and signing method from the current spec
An unsigned request gets 401 and creates nothing (BR-03).
-
Rate limits:
- Keep 100/min per IP for anonymous
/api/traffic. - For the agent path, count limits per agent credential in your app (a Redis token bucket), starting at about 2,000 requests/min (guess; set it from your CL-02 results).
- Add a cap per checkout session (for example 60/min) to stop retry loops.
- Keep a high per-IP backstop at Cloudflare.
- Always answer a limit with 429,
Retry-Afterand a JSON body.
- Keep 100/min per IP for anonymous
-
Keep Stripe Radar on for all agent orders, and watch card-testing signals (many small declines on one credential).
-
For discovery, allow verified crawlers (OAI-SearchBot, Googlebot) to read product and policy pages, both in robots.txt and in Cloudflare's AI-bot settings.
-
For UCP later, use Google's published verification method and IP ranges for its agent calls. Confirm them in the UCP docs.
F6. Refunds and status updates that always arrive (fixes risk 6).
- Use an outbox table. When an order status changes (created, shipped, canceled, refunded, partially refunded, return started, returned), write an event row in the same DB transaction.
- A worker sends each event to the agent platform's webhook, signed as the spec requires. It retries with backoff (1 min, 5 min, 15 min, 1 h, 6 h, then every 6 h for up to 72 h), moves failures to a dead-letter queue, and raises an alert.
- Use a Stripe idempotency key on every refund call (
refund_<order_id>_<line_id>). Listen to Stripe's refund update events, because a refund can fail after it is created. Only tell the agent "refunded" once Stripe confirms it. - Map your internal statuses to the protocol's status values in one function, and check the values against the current spec.
F7. Sessions that survive restarts (fixes risk 8).
- Store checkout sessions in PostgreSQL, or in Redis with persistence, not in Node memory. Then any instance can serve any call, with no sticky sessions.
- Set clear lifetimes. Guess: 30 min for the stock reservation and 24 h for the session record.
- On "retrieve" or "resume", re-check price and stock, and return messages when anything has changed.
F8. Clear shipping, tax, policy, payment messages and confirmation (fixes risks 9 and 10).
- Shipping: use the same function as your site checkout. Return every option with its cost and an earliest/latest delivery date, based on the warehouse cut-off time and carrier transit days.
- Tax: use one tax function for the site and agent checkout, show tax as its own line, and recalculate on every address change.
- Return policy page: make it server-rendered plain HTML, readable without JavaScript or cookies, and not challenged by Cloudflare. Write electronics-specific rules: opened vs. sealed items, faulty on arrival, warranty claims, restocking fee if any. Use the same window as the feed's return fields.
- Payment errors: map each Stripe decline code to the protocol's error code plus a plain message (for example "Your bank declined this card. Please try another payment method."). Never reveal fraud-rule details.
- Confirmation: send it from your domain (with SPF, DKIM and DMARC set up) to the buyer's email from the session. Include your order number and the agent's order reference. Tag the order source as "ACP" (later "UCP") in your DB, warehouse and analytics.
4. Go-live checklist and rollback steps
Go-live checklist
Protocol and accounts
- Current ACP requirements confirmed in the official docs, and the spec version written down.
- Merchant application or approval with the platform done.
- Stripe set up for delegated payments in the way the current Stripe docs describe.
- Return policy, terms and privacy URLs live and passing SX-03.
Tests passed in staging
- Must pass with 0 failures: RS-01 to RS-06, IS-01, CL-05, BR-01, BR-03, SH-03, SX-05.
- Load tests CL-01 to CL-04 pass at peak.
- DM-01 diff report clean for 3 days in a row: 0 price mismatches, stock mismatches ≤ 0.5%.
- DM-03 sale-end test passes with the new feed-first order.
- All other test cases pass, or have a written, accepted risk and an owner.
Systems in place
- Idempotency table, Stripe idempotency keys and the hourly reconciliation job are live.
- Sellable stock, reservations and the safety buffer are live. Fast-seller stock updates every ≤ 5 min.
- Merchant Center updates through the Merchant API and
sale_price_effective_dateare live. - Cloudflare agent rules and app-level signature checks are live. The fake-agent test is blocked, and normal bot protection is unchanged (BR-04).
- The webhook outbox, retries and dead-letter alert are live.
- Kill switch built and tested. A server-side flag makes agent checkout return the protocol's "checkout not available" style response, and a per-SKU
enable_checkoutflag controls each item in the feed. - Monitoring dashboards and alerts are live. An on-call person is named for each day of the first 2 weeks.
- Support team trained, with saved replies for agent orders. Finance has the daily Stripe-vs-orders report.
Launch plan
- Do not go live during a sale. That includes this week's Cyber Monday sales, because your price lag is worst during sales. Plan the first sale on the new channel only after DM-02 and DM-03 pass with live data.
- Launch on a weekday morning, with the team online.
- Phase 1 (days 1–3): turn on checkout for about 200 well-stocked, slow-moving SKUs. Leave out fast sellers.
- Phase 2 (days 4–10): expand to about 1,000 SKUs if all alerts stayed green.
- Phase 3 (day 11+): open the full catalog. Leave SKUs out while their sellable stock is under the buffer.
- UCP: start only after ACP has had 30 stable days and the Merchant Center price fix has been proven through one sale. Confirm UCP's current requirements (Merchant Center setup, payment handling, identity linking, order updates) in Google's docs first.
Rollback steps
Trigger rollback if any of these happen:
- any confirmed duplicate charge
- checkout error rate > 5% for 15 min
- more than 1% of the day's agent orders can't be fulfilled because of stock
- price mismatches seen at checkout > 2%
- any lost refund or status event older than 1 hour
Steps:
- Turn off agent checkout with the server-side kill switch. It takes effect at once, unlike a feed change. If the platform allows it, leave product discovery on, so shoppers can still find you and buy on your site (confirm this in the docs). Then set
enable_checkout = falsein the next feed. - If only some SKUs are affected, turn off just those SKUs instead.
- Freeze risky changes: pause scheduled sales and price changes until data match is confirmed again.
- Fix the money first: run the reconciliation job. Refund duplicate charges at once, and email those customers an apology.
- Honor orders already placed. Fulfill them, or cancel with a full refund and a clear message. Don't bulk-cancel without contacting the customers.
- Send correct statuses for every affected order through the outbox, so the agent shows customers the truth.
- Roll back code to the last good release tag. DB migrations must be backward compatible so a rollback is safe. Roll back Cloudflare rules from the saved config (Terraform or a documented rule list). Never fix a problem by turning off fraud protection.
- Tell the platform contact if their rules require it.
- Before turning checkout back on: write a short incident review, fix the cause, re-run the failed tests plus the "must pass" set, then restart at Phase 1 size.
5. 30-day monitoring dashboard list
Review rhythm:
- Week 1: check the dashboards daily.
- Weeks 2–4: check them 3 times a week.
- Day 30: review everything and decide on UCP.
A Critical alert pages the on-call person. A Warning alert goes to the team channel. All levels are starting guesses; tune them after week 1.
| # | Dashboard / metric | What it shows | Warning alert | Critical alert | Owner |
|---|---|---|---|---|---|
| Checkout health | |||||
| 1 | Error rate by endpoint (create, update, complete, cancel) | 5xx + timeouts ÷ calls | > 1% over 10 min | > 3% over 5 min | DevOps |
| 2 | Latency p95/p99 by endpoint | Speed vs. the platform timeout | p95 > 1 s | p95 > 2 s, or p99 near the platform timeout | DevOps |
| 3 | Checkout funnel | Sessions created → ready to pay → completed | Completion rate 30% below its 7-day average | 50% below | Backend lead |
| 4 | Blocks on the agent path | Cloudflare challenges, 403s and 429s on signed agent traffic | Any challenge on signed traffic | > 1% of agent requests blocked | DevOps |
| 5 | Bad-signature and unknown-caller requests | Attack or fake-agent signal | 5× the normal level | 20× the normal level, or a card-testing pattern | Backend lead |
| Retry safety | |||||
| 6 | Duplicates (reconciliation job) | More than 1 order or charge per session, charges without an order, orders without a charge | n/a | Any single case | Finance |
| 7 | Idempotency replays and "same key, different body" | Retry storms or client bugs | Replays > 10% of complete calls | Any "different body" rejection spike above 50/hour | Backend lead |
| Product data match | |||||
| 8 | Price mismatch rate | Hourly sample of 500 SKUs + every SKU on sale: feed vs. site vs. checkout | > 0.5% | > 2%, or any SKU where the feed price is lower than the checkout price | Catalog manager |
| 9 | Merchant Center diagnostics | Price/availability mismatch disapprovals | Any new mismatch disapproval | Any account-level warning | Catalog manager |
| 10 | Feed freshness | Age of the last successful ACP feed and Merchant API update | > 2× the schedule | > 4× the schedule | DevOps |
| Inventory | |||||
| 11 | Out-of-stock after order | Agent orders that can't be fulfilled | > 0.5% of the day's agent orders | > 2% | Catalog manager |
| 12 | "Feed in stock, checkout says out" | Feed vs. live stock disagreement | > 1% of sessions | > 3% | Catalog manager |
| 13 | Warehouse sync lag | Time since the last stock update, fast sellers vs. the rest | > 15 min for fast sellers | > 2 hours for any SKU | DevOps |
| 14 | Stock integrity | Negative sellable stock, reservations not released | Any reservation older than 2× its timeout | Any negative stock | Backend lead |
| Payments | |||||
| 15 | Decline rate, agent vs. site | Payment or token problems | Agent rate 5 points above the site | 15 points above the site | Finance |
| 16 | Disputes and Radar blocks on agent orders | Fraud and trust | Any dispute (review each one in the first 30 days) | Dispute rate > 0.5% (kept well under card-network programs) | Finance |
| 17 | Authorizations near expiry (if manual capture) | Orders not captured in time | Any authorization within 24 h of expiry | Any authorization that expired before capture | Finance |
| Refunds and status updates | |||||
| 18 | Refund failures | Stripe refund errors and later failures | Any failure | > 3 per day | Finance |
| 19 | Refund-to-agent delay | Time from refund to the agent platform's 2xx | > 15 min | > 1 hour | Support lead |
| 20 | Outbound webhook health | Failure rate, dead-letter queue size, oldest unsent event | Dead-letter queue > 0 | > 10 events, or any event > 1 hour old | DevOps |
| Customer experience | |||||
| 21 | Confirmation emails | Send failures and bounces for agent orders | Bounces > 2% | Send failures > 1%, or a missing confirmation on any order | Support lead |
| 22 | Agent-order support tickets | Tagged "where's my order", "wrong price", "charged twice", "can't return" | > 3 per day | Any confirmed "charged twice" | Support lead |
| 23 | Shipping and tax check | Daily re-calculation of agent orders against site rules | Any shipping difference | Any under-collected tax | Finance |
| 24 | Cancellations by reason | Stock, payment, customer, fraud | Any reason rising 2× week over week | Stock-reason cancellations > 2% of orders | Catalog manager |
Day-30 review: compare agent-channel conversion, cancellation, refund and dispute rates against your website. Fix any open Warning-level trend. Only then start UCP, re-using the same agent checkout core, outbox, stock rules and dashboards (adding a "protocol" filter to each).
The prompt
First lines open so you can see how it is built. The rest opens after purchase.
#ROLE You are an ecommerce technical lead who prepares online stores for AI shopping agents and agentic commerce protocols. Build a readiness test plan for my store before we connect. #INPUTS Fill in every line. Leave a line blank if you don't know it. - Store URL: [STORE URL] - Platform: [e.g., Shopify, WooCommerce, Magento, custom] - Protocol or channel we plan to connect: [e.g., OpenAI Agentic Commerce Protocol (ACP), Google Universal Commerce Protocol (UCP), Salesforce Agentforce Commerce, not decided]
How to use it
- Buy, then open it in your account.
- Copy the prompt into ChatGPT, Claude or Gemini.
- Replace the 7 inputs with your product.
- Run it. Use the output. Re-run with a different tone if you like.
Pro tips
- Be honest about stock and price lag. Those are the problems agents punish fastest.
- Run the retry and duplicate-order tests before anything else. A double charge loses a customer for good.
- Confirm protocol details in the official docs before you build. They change often.
Before you buy
- Will it work for my product?
- Yes, if you can fill the 7 inputs. If the output is bad with your inputs, email us: we fix the prompt and refund you.
- Do I download a file?
- No. It lives in your account with a copy button, and updates when we improve it.
- Which model is best?
- Best on Claude. Works in ChatGPT, Claude and Gemini.
Works well with this
Prompts people use in the same campaign.
More in Ecommerce, CMS & JavaScript
Buying more than two? Lifetime is cheaper.
Every prompt, every category, forever. $59 once. Nothing to download, nothing to renew.
This prompt
$3$7
- ✓ Instant access in your account, with a copy button
- ✓ Example input and real output included
- ✓ 7-day money-back, no form
Or get every prompt, forever
Lifetime Access · $59 $149 — all categories, all future prompts, rewrites included.
Get lifetime accessCard or PayPal · taxes at checkout · nothing to download
Not the one you need?
Browse every prompt by category and sub-category.