What is the x402 Protocol?
x402 is an open protocol built by Coinbase that enables AI agents to make payments over HTTP using the 402 Payment Required status code. Agents autonomously pay for API calls and services using stablecoins on Base and other EVM chains.
WHY IT MATTERS
The internet was designed with a native payment layer — HTTP 402 — that was never implemented. x402 realizes this vision for AI agents. When an agent requests a paid resource, the server responds with 402 and payment details, and the agent completes payment autonomously.
This creates a machine-readable payment standard. Agents don't navigate checkout pages — payment is negotiated at the protocol level using USDC on Base for instant, low-cost settlement.
x402 represents the first standard for how AI agents pay for services on the open internet, creating an economic layer where agents are first-class financial actors.
HOW POLICYLAYER USES THIS
PolicyLayer enforces spending policies on x402 flows. Before an agent responds to a 402 challenge, PolicyLayer validates amount, recipient, and frequency — critical because x402 payments happen at machine speed.