How x402 Payments Work: The Core Flow

The exact ordering can differ by scheme and payment-flow model. The v2 specification explicitly supports different verification/settlement orderings, but the basic business idea remains consistent: the resource should not be delivered without the required payment checks.
The Three Main Actors
11.1 Client
The client wants to buy something.
Examples:
AI agent
Browser
Mobile application
Backend server
MCP client
Data pipeline
Automated trading/risk system
Another APIThe client needs:
an x402-capable payment client;
a signer/wallet;
an acceptable asset;
policy rules;
sufficient funds.
11.2 Resource Server
The resource server owns or controls the thing being sold.
It decides:
What is protected?
What does it cost?
What payment schemes are accepted?
Which networks are accepted?
Which assets are accepted?
Where should value be received?
What happens after valid payment?11.3 Facilitator
A facilitator is an abstraction layer that can verify payment authorizations and settle them.
A simplified model:

The facilitator is optional in the architecture, but operationally useful because it removes a large amount of network-specific plumbing.
The reference design is trust-minimizing: a facilitator should not have arbitrary authority to move a payer's funds beyond what the payer has authorized.
What Actually Travels Across the Wire
For HTTP, x402 v2 uses payment information in headers.
The key conceptual headers are:
PAYMENT-REQUIRED
PAYMENT-SIGNATURE
PAYMENT-RESPONSEA simplified payment requirement might conceptually say:
{
"x402Version": 2,
"resource": {
"url": "https://example.com/api/report",
"description": "Premium report"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "100000",
"asset": "<token identifier>",
"payTo": "<merchant wallet>",
"maxTimeoutSeconds": 60
}
]
}This example is intentionally simplified.
The important fields are:
Field | Meaning |
|---|---|
| Protocol version |
| What the buyer is buying |
| Acceptable payment choices |
| Payment behavior |
| Settlement network |
| Amount in the required atomic units |
| Asset/currency identifier |
| Recipient |
| Valid payment window |
| Optional additional protocol capabilities |
The buyer selects an acceptable payment requirement and constructs a signed PaymentPayload.
That payload provides cryptographic evidence that the buyer authorized the transaction under those terms.
Related x402 Explainers
If You Are Building This Commercially
If the x402 payment ultimately needs to convert into fiat or settle into ordinary operating accounts, the protocol layer may need to connect to a stablecoin payment structure and multi-currency accounts.
Key Takeaway
The payment flow is a commercial state machine: request, quote, policy decision, authorization, verification, settlement, and delivery must remain linked by identifiers and reconciliation.
This page is part of x402 Protocol Explained, the full guide to how machine-to-machine payments work.
