# AP2 vs x402: Which agent payment protocol for what?

> AP2 proves what a customer approved; x402 pays for single requests via HTTP 402. Differences, use cases and examples for merchants.

- Source: https://www.agentic-commerce.sh/en/guides/ap2-vs-x402/
- Author: Stefan Hamann
- Updated: 2026-11-30
- Language: en

AP2 and x402 are both called agent payment protocols, but they answer different questions. **AP2** (Agent Payments Protocol) proves what a customer approved: signed mandates for a purchase and its payment, which merchants and payment services can verify. **x402** lets software pay for a single resource over HTTP: the server answers an unpaid request with HTTP 402 and payment requirements, the client returns payment evidence and gets the service. AP2 is about authority for a shopping purchase; x402 is about paying per request for digital services.

## AP2 vs x402 at a glance

|   | AP2 | x402 |
| --- | --- | --- |
| Question it answers | What did the customer authorise the agent to buy and pay? | How does software pay for this one request? |
| Publisher | Developed by Google; contributed to FIDO standardisation work | x402 Foundation |
| Mechanism | Checkout Mandate and Payment Mandate | HTTP 402 response with payment requirements, then payment evidence |
| Typical use | A shopping agent buying from a merchant | An agent paying for an API call or a data request |
| Payment route | Works alongside existing payment methods | Determined by the payment scheme and network in the requirements |
| Current state | Release 0.2.0 | Specification family v2 |
| Licence | Apache-2.0 | Apache-2.0 |

Sources and versions: [AP2 profile](https://www.agentic-commerce.sh/en/protocols/ap2/) and [x402 profile](https://www.agentic-commerce.sh/en/protocols/x402/).

## When does a merchant need x402?

When it sells something software buys in small units: a search query, a dataset, an API call. AWS Marketplace now lets agents pay per request for selected services through Amazon Bedrock AgentCore with x402; a first request gets HTTP 402 with a signed quote and AgentCore checks the session budget before issuing a payment token ([our analysis](https://www.agentic-commerce.sh/en/news/aws-marketplace-agentcore-x402/)). In [Chapter 8](https://www.agentic-commerce.sh/book/en/08-from-the-offer-to-the-service-that-follows/) I describe our x402 research preview, in which a Shopware plugin links an order to a payment request that software can read.

## When does a merchant need AP2?

When a customer delegates a purchase and the merchant or payment service must be able to show later what was approved. AP2 is integrated into UCP checkout through a mandate extension and is also available as an A2A extension. It does not move money by itself; it records the authority behind the payment.

## Can they be combined?

Yes, in principle, because they sit at different points: approval on one side, a payment request for a resource on the other. Google's agentic commerce organisation on GitHub, home of AP2, also hosts an A2A x402 extension that adds x402 payments to agent-to-agent conversations. For a typical retail shop, AP2-style approval matters first; x402 becomes relevant for digital, per-request offers.

## Book chapters, articles and sources

- Chapter 8 · [From the offer to the service that follows](https://www.agentic-commerce.sh/book/en/08-from-the-offer-to-the-service-that-follows/)
- Appendix B · [The compact protocol passport](https://www.agentic-commerce.sh/book/en/b-the-compact-protocol-passport/)
- [ACP vs AP2: checkout and approval](https://www.agentic-commerce.sh/en/guides/acp-vs-ap2/)
- Stefan Hamann · [When Customers Turn Into Code: The Playbook for Machine-to-Machine Commerce](https://stefan-hamann.de/artikel/when-customers-turn-into-code-the-playbook-for-machine-to-machine-commerce-2025/)
- [Agent Payments Protocol (AP2)](https://ap2-protocol.org/)
- [x402](https://x402.org/) · [A2A x402 extension](https://github.com/google-agentic-commerce/a2a-x402)
