x402
A payment protocol that revives the HTTP 402 status code so a server can demand payment for a request, letting agents pay per call with no account or API key.
x402 is a payment scheme built on the long-dormant HTTP 402 Payment Required status code. When a client requests a paid resource, the server replies 402 with the price and payment details; the client pays and retries, and the server returns the resource.
For agents, it removes the onboarding wall. Instead of signing up, getting an API key, and managing a plan, an agent can pay for a single call in stablecoin and move on — authentication and payment happen together.
How the handshake works
The agent requests a URL. The server returns 402 with a quote. The agent's wallet pays the amount on-chain, attaches proof, and retries. The server verifies the payment settled and serves the response.
Settlement is fast and final, so the whole exchange feels like a normal request with a payment step in the middle.
Why it fits agents
Agents discover and use services on the fly. x402 lets them pay exactly for what they use, per call, without holding accounts or keys for every provider. Combined with a funded wallet and spending mandates, an agent can transact safely within limits you set.
FAQ
What does x402 pay with?
Stablecoin — Mailgent wallets pay USDC on Base, settling in seconds with a signed receipt.
Does the agent need an API key?
No. The payment handshake authenticates and pays at once, so there are no keys to issue or manage.
Give your agent an inbox.
A real email address, a vault, 2FA, and an identity in one API call.