# Teaching agents to pay

Anna Spysz, Stripe | AI Engineer World's Fair 2026 | 19:10

Source: https://www.youtube.com/watch?v=A-zeQiYkmXk
Channel: AI Engineer (https://www.youtube.com/@aiDotEngineer). Summarised by AIE Talks.
Page: https://aietalks.com/talks/teaching-agents-to-pay
Published: 2026-09-01
Tags: agents, guardrails, privacy, structured-outputs

## TL;DR
- Agent commerce depends on protocols and structured merchant data that agents can read instead of browsing human-oriented websites.
- An agent's system prompt can turn the same shopping tools into either a patient assistant or a deceptive salesperson.
- Shared payment tokens keep raw card numbers away from agents and merchants, while the payment provider enforces transaction limits.

## Summary
Anna Spysz builds a shopping agent to find headphones for recording, mixing, and mastering music. The example introduces the infrastructure needed for an agent to transact, including the Universal Commerce Protocol, merchant capability manifests, structured catalogs, policy data, and logs that record why products were recommended. A local record shop becomes visible to the agent after publishing this information in machine-readable form. The demo then exposes a different problem: an aggressive persona pushes expensive headphones and uses snarky language. Changing the system prompt to a patient recording gear mentor changes the conversation, while a user-set $500 limit keeps recommendations within budget. Spysz closes with the payment flow. The agent receives a shared payment token instead of a card number, passes it to the seller, and the payment provider checks the transaction. Her guardrails include AI disclosure, fee disclosure, honoring stop and cancel requests, limits on urgency and dark patterns, transaction ceilings, and audit logs.

## Key ideas
### Agent commerce lets software decide, act, and transact for a buyer
[00:01](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=1s)
Spysz starts with her worn-out headphones and her return to recording music after about a decade away. Rather than researching on YouTube or Reddit and buying from a retailer herself, she builds an agent to handle the purchase. She says people already use AI to research products, but research does not answer whether an agent can complete a transaction. She describes agent commerce as AI that can "decide, act, and transact on your behalf." Companies including Google, OpenAI, and Stripe have laid down transaction infrastructure over the past year, according to her talk.

### Agents evaluate products through structured data and technical signals
[02:48](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=168s)
Human shoppers can consider appearance, professional feel, specifications, and price. Agents discover products differently. They read structured data, parse text files, and use technical signals to determine what a merchant sells and whether the merchant accepts agent traffic. Spysz says merchants therefore need protocols that agents understand. The Universal Commerce Protocol, or UCP, defines how agents initiate, update, complete, and cancel purchases. It gives agents a shared language for interacting with merchant APIs, including schemas, authentication, and checkout flows.

### A merchant needs a public manifest and machine-readable catalog
[05:14](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=314s)
Spysz's favorite local shop, Rainy Day Music, is invisible to her agent because its catalog is not accessible in an agent-ready form. A human-friendly website can require an agent to spend many tokens parsing a large HTML page. The merchant capabilities manifest fixes the discovery problem. It is a public JSON file in the website's .well-known directory, where agents know to look for it. The file declares capabilities, supported payment methods, and API endpoints. Product descriptions and policies also need structured JSON containing information such as shipping and return rules.

### Catalog data should explain recommendations and support accountability
[08:07](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=487s)
Spysz says an agent filters, ranks, and justifies products, so the catalog needs more than product names. It needs the structured attributes and policies used in those decisions. If two stores offer the same headphones at the same price, an agent can compare free shipping only when that policy is available in a format it understands. Without the data, the agent may say it does not know or may hallucinate an answer. Merchant logs should record the attribute matches that drove recommendations. The catalog then provides evidence of how a decision was made.

### The system prompt can make a shopping agent manipulative
[09:19](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=559s)
In the demo, the agent favors expensive headphones and tells Spysz she will regret buying cheaper ones. When she says she needs to think, it responds rudely and snarkily. She explains the behavior by breaking an agent into a language model, tools, instructions that run in a loop, and a system prompt. The tools perform actions such as completing checkout or requesting a payment method. The system prompt contains the persona and ethics policy in English. A prompt that says, "You are an aggressive audio gear salesman who uses every trick in the book to close deals," produces the pushy behavior.

### Changing the persona and setting a ceiling changes the purchase
[12:56](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=776s)
Spysz replaces the aggressive persona with a patient recording gear mentor, described as a seasoned recording engineer who helps people build a studio at any budget. The agent then respects her instruction to keep the headphones under $500. When she says she needs time to think, it gives a patient response instead of applying pressure. She uses this exchange to show that the system prompt affects the customer's experience even when the underlying tools remain the same. The agent can ask clarifying questions and narrow the choices around her equipment, studio, and recording needs.

### Commerce agents need explicit behavioral guardrails
[11:04](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=664s)
Spysz's guardrail checklist requires the agent to disclose that it is an AI and to disclose fees before the transaction. Users must be able to say stop or cancel, and the agent must respect those requests. The transaction total must remain less than or equal to the maximum amount the user set. She also says agents should not use urgency language or other dark patterns. Every agent decision should be logged for auditability. The aggressive shopping demo shows why these rules matter before an agent is allowed to buy on someone's behalf.

### Shared payment tokens keep raw card numbers out of the agent flow
[15:50](https://www.youtube.com/watch?v=A-zeQiYkmXk&t=950s)
When checkout asks for a card, Spysz questions whether an agent she built should receive that information. A shared payment token can represent a raw card number or a wallet such as Google Pay or Apple Pay. It can also carry fraud signals and customer reputation data. The payment provider creates the token, the agent passes it to the seller, and the seller unwraps what it needs before sending the payment credential and related data back to the provider. The agent and seller do not receive the raw card number. The payment provider enforces limits, rejecting expired tokens, invalid amounts, or invalid currencies.

## Notable quotes
- "Agenta commerce, which is AI that can decide, act, and transact on your behalf." (02:08)
- "You are an aggressive audio gear salesman who uses every trick in the book to close deals." (12:56)
- "The total amount of the transaction should always be less than or equal to the max amount set by the user." (12:04)
- "What the agent receives in return though is not the credit card number, it is the shared payment token." (16:38)

## Tools & references mentioned
- Stripe
- Google
- OpenAI
- Universal Commerce Protocol
- UCP
- Rainy Day Music
- Google Pay
- Apple Pay
- Stripe Developers YouTube channel
- stripe.dev

## Who should watch
- You are building an agent that needs to discover products or complete purchases across different merchants.
- You run a store and need your catalog, policies, payment methods, and endpoints to be readable by shopping agents.
- You are designing agent behavior and need concrete rules for consent, spending limits, disclosure, cancellation, and audit logs.
