x402
An HTTP payment handshake: the server answers 402, the client pays in a stablecoin, and the resource unlocks.
Basically
An HTTP handshake where the server names a price and the client pays before getting the page.
Key Takeaways
- x402 reuses the 402 status code: the first request returns payment requirements, the second carries proof.
- Payment settles in a stablecoin, and the resource unlocks on verification.
- It removes API keys and billing accounts from the picture.
How It Works
A client requests a resource. The server answers 402 with a challenge: network, asset, amount, address. The client signs a payment and retries with proof in a header.
A facilitator verifies the payment and the server returns the content.
Why It Exists
Machine clients cannot fill in signup forms. x402 lets an agent discover a price, pay it and continue in one exchange, with no account.
Settlement is per call, so there is no subscription and no prepaid float.
Limits
Prices must be small enough to fit under the per-call overhead, and chains with cheap finality are needed.
It also needs a discovery layer, otherwise the client has to know the price in advance.