← Payment Reference GuidesInternet-Native Payments

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.

LayerProtocolStewardWhat it standardises
Tool accessMCPAnthropic (open)How an AI model connects to external tools and APIs — the plumbing an agent uses to reach a merchant endpoint at all.
Agent↔agentA2AGoogle → Linux FoundationTask exchange between independent agents (shopping agent ↔ merchant agent). AP2 is defined as an extension of A2A/MCP.
Agent identityWeb Bot Auth · Visa TAPCloudflare → IETF httpbis · VisaRFC 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.
CheckoutACP · UCPOpenAI + Stripe · Google + ShopifyThe 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 & authorizationAP2Google (launched Sep 2025, 60+ partner orgs) → FIDO Alliance; v0.2, Apr 2026Cryptographically 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 railx402 · MPP · cardsx402 Foundation (Linux Foundation) · Stripe + Tempo · schemesMoving 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

  1. User delegates a task. For an autonomous purchase they sign open Checkout and Payment Mandates (AP2) naming the agent's key and the limits.
  2. The agent discovers the merchant endpoint (MCP tool call or A2A) and negotiates a cart — via ACP where the merchant supports it.
  3. 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.
  4. 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.

1 / 10
🧑UserTrusted Surface
🤖Shopping AgentAI surface
👛Credential Provider+ network
🏪MerchantCheckout
🏦Merchant PSPPayment processor
1
Shopping Prompt
2
Build Cart & Checkout
3
Instrument Options
4
Mandates to Trusted Surface
5
User Signs Both Mandates↻
6
Payment Mandate → CP
7
Token + Checkout Mandate
8
Payment with Mandate
9
Payment Receipt
10
Checkout Receipt
Initiation

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.

Initiation
Authorization
SCA Challenge
Issuer Risk Check
Response
Mandate Signing
Completion

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

Put it into practice

Next steps

Keep reading

Related articles