---
title: "Let agents buy through the same order flow · Agent Wranglers"
url: https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing/agent-checkout
id: AGT-80
level: Optional
applies: payments
updated: 2026-10-27
build: a2a6bdfed830
tokens: 864
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Let agents buy through the same order flow as people

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Quotas and pricing](https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: AGT-80
- Level: Optional
- Chapter: [Quotas and pricing](https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing.md)
- Rule: If you open checkout to AI agents, run their orders through the same order, price, tax and fraud code as the web checkout. Charge their payment tokens through your provider.
- Check: A test sends an order through the agent endpoint and one through the web checkout with the same cart. Both produce the same total, tax and order states. A payment token used a second time is refused.
- Applies when: The project takes payments.
- Spec version: ACP 2026-04-17
- Review by: 2027-04-30
- How: In ACP and similar flows, the agent sends a cart and a payment token that the buyer's wallet or provider issued. The token is limited to one merchant, an amount and an expiry date. You stay the seller, so the prices, refunds and consumer rights in the [payments playbook](https://agentwranglers.se/playbook/payments.md) all still apply. Create the order with [Freeze what the customer agreed to on the order](https://agentwranglers.se/playbook/payments/amounts-and-orders/order-snapshot.md) and charge it with an idempotency key. Mark agent orders, so you can watch their refund and dispute rates apart from the rest.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
export async function createAgentOrder(request) {
  const order = await orders.createFromCart(request.cart, { channel: 'agent', agent: request.agentId })
  await payments.chargeToken(order, request.paymentToken, { idempotencyKey: `order-${order.id}` })
  return order
}
```

### Python example

```python
def create_agent_order(request):
    order = orders.create_from_cart(request.cart, channel="agent", agent=request.agent_id)
    payments.charge_token(order, request.payment_token, idempotency_key=f"order-{order.id}")
    return order
```

## Sources

- [Agentic Commerce Protocol](https://www.agenticcommerce.dev/)

## Related rules

- PAY-12 [Freeze what the customer agreed to on the order](https://agentwranglers.se/playbook/payments/amounts-and-orders/order-snapshot.md) in Payments and billing

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing/agent-checkout">Agent Wranglers agents as users playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Cap what each agent grant may spend](https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing/spend-cap-per-grant.md)
- Next: [Keep the buyer's signed approval with each agent order](https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing/agent-mandates.md)
- [Quotas and pricing](https://agentwranglers.se/playbook/agents-as-users/quotas-and-pricing.md)
