x402 Explained: How AI Agents Pay Over HTTP, and the Privacy Layer Agent Commerce Needs Next
The HTTP status code 402 has carried the label "Payment Required" since the early days of the web, reserved for a purpose that never arrived. x402, the payment protocol Coinbase published in May 2025, finally gives it one. A server can respond to a request with a price, a client can pay it, and the request can complete, all inside the normal HTTP request-and-response cycle. For AI agents that need to buy data, call paid APIs, and pay for compute without a person entering card details, that closes a gap that has held back machine commerce for years.
In 2026 the protocol moved under the Linux Foundation as the x402 Foundation, with roughly 40 members including Visa, Mastercard, American Express, Stripe, Google, AWS, Cloudflare, Circle, and the Solana Foundation. That backing signals the direction clearly: agent-initiated payments are becoming standard infrastructure, and the rail is being built in the open. IronWeave has been building the sovereign data layer that a rail like this will need beside it. Here is how x402 works, and where the data layer still carries the weight.
How x402 Works
The exchange runs in four steps. An agent requests a resource, for example a data endpoint. If the resource is paid, the server returns an HTTP 402 response carrying structured payment metadata: the amount, the accepted token, the destination address, the chain, and an optional facilitator endpoint. The agent signs a payment authorization, without exposing its private keys, and a facilitator broadcasts the transaction and confirms settlement onchain. The agent then retries the original request with proof of payment attached, and the server verifies settlement and returns the resource.
Settlement happens in stablecoins, most often USDC, and the protocol is chain-agnostic across EVM networks and Solana. The facilitator absorbs the blockchain mechanics of gas, submission, and confirmation, so the agent and the server never handle them directly. The design is clean, and for the problem it targets, it works.
What the Standard Gets Right
x402 earns its adoption. It needs no accounts and no pre-registration. It supports payments small enough to price a single API call, which subscription billing cannot do. It stays neutral across chains and tokens, and it is governed in the open by a foundation rather than a single vendor. For builders wiring payments into agent workflows, it removes real friction.
What the Settlement Record Reveals
The property that makes x402 verifiable also makes it public. Every settlement is an onchain record tied to a wallet address. The amount, the timing, and the counterparty address are visible to anyone reading the chain. Across many payments, an agent's wallet becomes a behavioral fingerprint: which services it calls, how often, how much it spends, and who it pays. Balances can be inferred from that history. For a consumer agent, that record is a personal profile. For an enterprise agent, it is competitive intelligence leaking with every call, exposing the vendors a company depends on and the cadence of its operations.
The facilitator sees the payment authorization. The resource server learns the paying wallet. Neither outcome is a flaw in x402. Settlement transparency is what the rail was designed to provide. It does mean the privacy of what the agents are doing has to be solved somewhere else.
Where a Sovereign Data Layer Fits
IronWeave's patented Shared-Block Architecture treats each exchange as an independently encrypted block, with keys held only by the participants. The nodes that carry the network never access the contents. The network can prove a valid exchange occurred while learning nothing about it, and range proofs confirm a payment has sufficient coverage without revealing the balance behind it.
Applied to agent commerce, that changes what the record exposes. An agent can prove it can pay, and that settlement happened, without publishing the amount, the counterparty, or its spending history. The payment rail and the data layer are complementary. x402 standardizes how the request to pay travels. A sovereign data layer keeps the data moving around that payment, the proprietary prompts, the customer records, and the content being bought, out of everyone else's reach.
For Builders
If you are building agent commerce on x402 today, build on it. For the data your agents exchange around each payment, the layer underneath has to be one the infrastructure itself cannot read. That is the same requirement we covered in the privacy data layer AI needs, and agent payments make it concrete.
Ready to create the future? Request Early Access and build with us.