The 'Pay' button carries more than you think
A normal web checkout takes a lot for granted. It assumes the person who clicks Pay owns the card, is looking at the cart at that moment, and means it. That one click does three jobs at once:
- Intent. "I want these items at this price."
- Authority. "I'm allowed to spend this money, and I'm choosing to."
- Evidence for liability. The session, the login, the 3-D Secure challenge and the IP address are what a dispute team uses later to work out who pays if something goes wrong.
When an agent does the clicking, those three come apart. The user said something in plain language, perhaps days earlier. A model turned it into a plan. Software placed the order. Any of those steps can go wrong without the others. Your system has to rebuild, as stored data, what the click used to carry without anyone noticing.
Here's an analogy from the office. You hand a colleague the company card and say "grab coffee for the 3pm meeting". If they come back with a £200 espresso machine, nobody disputes that they had the card. The questions are what you meant, what you allowed, and who eats the cost. Agent purchases raise the same three questions, millions of times a day, with no colleague to ask.
A worked example
On Monday the user tells their assistant: "Reorder my usual coffee beans, keep it under £30." The assistant could be Claude, GPT, Gemini or an open-weight model. It makes no difference here.
On Thursday the agent finds the usual 1 kg bag out of stock. It picks 2 × 500 g of a different roast from the same shop: £27.80 plus £4.00 delivery, so £31.80.
Run it through the three questions:
| Question | What happened | Evidence you'd need |
|---|---|---|
| Intent | "Usual beans" became a different roast | The request word for word, the agent's structured reading of it, and the cart it actually built |
| Authority | The cap was £30. Does delivery count? Is a swap allowed? | Who granted the permission, its scope (amount, merchant, substitutions), its expiry, and whether the user confirmed this cart |
| Liability | The user disputes the charge | Timestamps, which component made which decision, and whether a human approved it |
The user's words don't settle either point, and that is the real lesson. Gaps like these have to be closed when permission is granted, not argued over afterwards.
Write the evidence down as data
Treat each purchase as a record you can hand to a dispute analyst. In TypeScript:
// One record per agent purchase. Written before the order is placed and never edited.
interface PurchaseEvidence {
intent: {
rawRequest: string; // the user's exact words, not a summary
interpretedAs: { // what the agent decided they meant
product: string;
substitutionsAllowed: boolean;
};
finalCart: { sku: string; qty: number; unitPence: number }[];
};
authority: {
grantedBy: string; // user ID
grantedAt: string; // ISO 8601
expiresAt: string; // permissions should never be open-ended
maxTotalPence: number; // includes delivery and tax, stated explicitly
allowedMerchants: string[];
userConfirmedCart: boolean; // did a human see THIS cart?
};
trail: {
agentModel: string; // e.g. which model and version proposed the cart
decidedAt: string;
totalPence: number; // computed by code, never by the model
};
}
Then check it with plain code. The model proposes and the code decides:
from datetime import datetime, timezone
def check(ev: dict) -> list[str]:
"""Return reasons to stop. An empty list means the purchase may proceed."""
problems = []
a, i = ev["authority"], ev["intent"]
total = sum(l["qty"] * l["unitPence"] for l in i["finalCart"]) + ev["deliveryPence"]
if total > a["maxTotalPence"]:
problems.append(f"total {total} exceeds cap {a['maxTotalPence']}")
if datetime.fromisoformat(a["expiresAt"]) < datetime.now(timezone.utc):
problems.append("authority expired")
if ev["merchant"] not in a["allowedMerchants"]:
problems.append("merchant not allowed")
if ev["isSubstitute"] and not i["interpretedAs"]["substitutionsAllowed"]:
problems.append("substitute item needs user confirmation")
return problems
For the coffee order:
['total 3180 exceeds cap 3000', 'substitute item needs user confirmation']
The right outcome is to ask the user rather than buy.
Gotcha: never let the model add up the total or decide something is "close enough". Models are poor at arithmetic and too willing to please. Keep amounts in integer pence and compare them in code.
Three failures a web checkout never faces
- Misread request. "My usual" or "something nice for Mum" gets interpreted, and the interpretation can be wrong. A human shopper sees their own mistake in the cart before paying. An agent's mistake reaches the payment step unless you show the cart to the user.
- Stale authorisation. The user said yes on Monday, but on Thursday the price, the stock or the user's situation has changed. Consent given to an earlier world gets applied to a new one. Expiry times and price caps are your defence.
- Unexpected purchase. The agent buys when the user didn't expect it to. A "keep me stocked" rule might fire after the user has moved house. Or text hidden on a product page might talk the agent into adding an item. With a human checkout, the user is always present for the purchase. With an agent, they may be asleep.
Why liability is the hardest of the three
Card and payment rules were written around a yes-or-no question: was this payment authorised? Agents create a middle ground. The credential was used legitimately, but the purchase isn't what the user wanted.
- In the US, Regulation E says a transfer made by someone the consumer gave the access device to is generally not "unauthorized". So "my agent bought the wrong thing" may count as a merchant dispute rather than fraud.
- In the UK, the Payment Services Regulations 2017 require a provider to refund an unauthorised payment. Whether "authorised" covers an agent going beyond its instructions is not settled.
- Payment processors say openly that how losses are split between merchant, card issuer and agent platform, once a case goes beyond plain fraud, is still being worked out.
The industry's answer so far is to sign the evidence. Google's AP2 uses signed "mandates" that record what the user authorised. Mastercard's Verifiable Intent aims to create a tamper-resistant record of the same thing. Later levels cover these properly. For now the point is that every scheme is trying to capture intent and authority as data, which is exactly what you just did.
Exercise: a one-page purchase evidence spec
Create purchase-evidence.md for this order: "Book me the cheapest refundable train to Manchester on Friday morning." The agent books a £64 ticket.
# Purchase evidence: train booking
## Intent
- Raw request (verbatim):
- Structured interpretation (date, time window, 'refundable', 'cheapest'):
- Final basket shown to user:
## Authority
- Granted by / at / expires:
- Scope: max total, merchants, fare types:
- Confirmation: required? how captured?
## Liability trail
- Who decided what (model, rules engine, user), with timestamps:
- What we'd send a dispute analyst:
## Failure modes
- Misread: (e.g. 'morning' = before 12:00?)
- Stale: (fare changes between quote and booking)
- Unexpected: (books when the user only asked for options)
For every field, write why a dispute analyst would want it.
Key takeaways
- A human's click on Pay carries intent, authority and evidence all at once. An agent purchase has to rebuild each one as stored data.
- Intent is what they meant, authority is what they allowed, and liability is who pays when it goes wrong.
- Set caps, expiry and substitution rules when permission is granted, and include delivery and tax in the cap.
- Code checks the cart against the authority. The model only proposes.
- Misread requests, stale authorisations and unexpected purchases are failure modes that agents introduce.
- How liability is split for agent purchases that aren't plain fraud is still unsettled, so keep the evidence.