The x402 Payment Protocol
How HTTP 402 Payment Required became a real payment rail: the request/quote/sign/settle handshake, the EIP-3009 stablecoin authorization underneath it, the facilitator model, and what it means for payment engineers coming from card rails.
The agentic commerce protocol stack
x402 is one layer of a stack that formed rapidly through 2025–2026. The layers are complementary, not competing: a full agent-initiated purchase can use a discovery protocol to find the merchant, ACP to run the checkout, AP2 to prove the human authorised it, and a payment rail — cards or x402 — to move the money.
| Layer | Protocol | Steward | What it standardises |
|---|---|---|---|
| Tool access | MCP | Anthropic (open) | How an AI model connects to external tools and APIs — the plumbing an agent uses to reach a merchant endpoint at all. |
| Agent↔agent | A2A | Google → Linux Foundation | Task exchange between independent agents (shopping agent ↔ merchant agent). AP2 is defined as an extension of A2A/MCP. |
| Agent identity | Web Bot Auth · Visa TAP | Cloudflare → IETF httpbis · Visa | RFC 9421 HTTP Message Signatures on every agent request, keyed to a registry; TAP adds payment claims and Visa's Agentic Registry. Decode headers in the HTTP Message Signature decoder. |
| Checkout | ACP · UCP | OpenAI + Stripe · Google + Shopify | The commerce handshake: product feed, cart, and a delegated payment token from buyer's agent to merchant. ACP is in beta, first implemented by OpenAI and Stripe; UCP (Apache-2.0, Jan 2026) runs in Google AI Mode and Gemini. |
| Trust & authorization | AP2 | Google (launched Sep 2025, 60+ partner orgs) → FIDO Alliance; v0.2, Apr 2026 | Cryptographically signed mandates (SD-JWT VCs) proving what the human authorised: a Checkout Mandate for the exact checkout and a Payment Mandate for paying it, in open form (constraints, for purchases without the user) or closed form (one specific transaction). |
| Settlement rail | x402 · MPP · cards | x402 Foundation (Linux Foundation) · Stripe + Tempo · schemes | Moving the money. AP2's reference samples include an x402 path (this guide). MPP is the second 402-style protocol: live since Tempo mainnet (18 Mar 2026), a sessions primitive for streaming micropayments, extended to cards by Visa and to Lightning by Lightspark. The card path rides normal network authorization, with the AP2 Payment Mandate verified by the credential provider and network. |
x402 vs MPP
Both activate HTTP 402. x402 (Coinbase/Cloudflare, now the x402 Foundation with Visa, Mastercard, Amex, Stripe, Adyen, AWS and Google among 22 launch members) is stablecoin-native: the server's requirements JSON names a scheme, network and amount, and the client answers with a signed EIP-3009 transfer that a facilitator settles. MPP (Stripe + Tempo, mppx SDK) starts the same way but is method-agnostic — the challenge can be satisfied with Stripe's Shared Payment Tokens (cards), a Tempo USDC transfer, or Lightning — and adds sessions: an up-front spending authorisation against which the agent streams micropayments without a transaction per call. AWS Bedrock AgentCore Payments (GA August 2026, built with Coinbase and Stripe) exposes both behind one managed API. Expect merchants to accept either; expect agents to speak both.
AP2 in one paragraph
AP2 answers the question the card networks care about most: what proof exists that the human wanted this purchase? Since v0.2 (April 2026) there are two signed mandates: a Checkout Mandate, which binds the merchant-signed checkout, and a Payment Mandate (payee, amount, instrument), linked to the checkout by its hash. With the user present, the user signs both on a trusted surface. For purchases in their absence, the user signs open mandates with constraints (amount range, merchants, line items) and the agent's key, and the agent later signs the closed ones itself. Merchant and payment processor return signed receipts; mandates plus receipts are the dispute evidence. Inspect real spec examples in the AP2 Mandate Decoder.
How a purchase composes the layers
- User delegates a task. For an autonomous purchase they sign open Checkout and Payment Mandates (AP2) naming the agent's key and the limits.
- The agent discovers the merchant endpoint (MCP tool call or A2A) and negotiates a cart — via ACP where the merchant supports it.
- Human-present: the user signs the closed mandates for the exact checkout. Human-not-present: the agent signs them with its key, and verifiers check them against the open mandates' constraints or send the user back to approve.
- Payment executes on the chosen rail: a card payment with a token the credential provider issues after verifying the Payment Mandate, or an x402/EIP-3009 transfer for the crypto path (step through it).
Interactive: AP2 purchase, step by step
Step through both AP2 modes. Human Present: the merchant signs the checkout and the user signs the closed Checkout and Payment Mandates on a trusted surface. Human Not Present: the user signs open mandates with constraints, the agent signs the closed ones, and verifiers check the chain. Click any step for the detail.
The user approves the exact checkout. The merchant signs the checkout, the user signs a closed Checkout Mandate and a closed Payment Mandate on a trusted surface — both bound to the checkout by its hash — and each verifier returns a signed receipt.
Shopping Prompt
User asks the agent to shop.
"White running shoes, size 10, under $150." In a human-present flow the user will approve the final checkout themselves.
Where the incumbents stand
Visa and Mastercard both back AP2 and have their own agentic programmes (Visa Intelligent Commerce, Mastercard Agent Pay) built on tokenised, agent-specific credentials. EMVCo has stood up a Digital Identity and Payments Task Force to work agentic payments into the EMV specifications. The connective tissue across all of it is verifiable credentials — the same machinery behind the EUDI wallet, which is why AP2 landing at the FIDO Alliance matters: agent authorization and human authentication are converging on one credential model.
Related: AP2 Mandate Decoder · x402 Header Decoder · x402 Flow Simulator · EUDI Wallet & Payments · 3-D Secure Guide