The protocol
What is x402?
x402 is an open payment protocol that revives HTTP's long-dormant 402 Payment Required status code. It lets any HTTP endpoint charge for access — and any client with a crypto wallet pay for it — in a single extra round trip. No accounts, no API keys, no subscriptions, no invoices.
How a paid call works
1 · The request
A client — usually an AI agent — sends a normal HTTP request to a paid endpoint. The server responds with status 402 Payment Required and a JSON body describing what it costs: amount, asset (usually USDC), network, and the address to pay.
2 · The payment
The client's x402 library signs a payment authorization for exactly that amount using the agent's wallet key. On EVM networks this is an EIP-3009 transferWithAuthorization signature — the client never submits a transaction itself and pays no gas.
3 · The retry
The client retries the same request with an X-PAYMENT header carrying the signed authorization. A facilitator verifies and settles the payment onchain, and the server returns the real response. One extra round trip, no account state anywhere.
In code
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
// Any x402 endpoint from the directory now "just works":
const res = await fetchWithPay("https://api.example.com/search?q=x402");
const data = await res.json();Client libraries exist for TypeScript, Python, Go, Java, and Rust, plus middleware for Express, Hono, Next.js, FastAPI, and Gin on the server side. See the open-source repo and protocol docs.
FAQ
Why not just use API keys?
API keys assume a human signed up, added a credit card, and manages a subscription. Agents can't do that at scale — but they can hold a wallet. x402 turns every API call into a self-contained micropayment, so an agent can discover a brand-new service in this directory and be a paying customer seconds later.
What do payments settle in?
Almost all listings settle in USDC. Base is the dominant network, with Solana, Polygon, Arbitrum, and others also represented. Each listing here shows exactly which networks and assets the service accepts.
What does a call cost?
Prices are set by each provider and are typically fractions of a cent up to a few dollars per call. The directory shows the per-call price on every listing and lets you sort by cheapest.
Is x402 a Coinbase product?
x402 is an open protocol with an open-source spec and client libraries in TypeScript, Python, Go, Java, and Rust. Coinbase created it and runs the main discovery network this directory indexes, but anyone can implement a server, client, or facilitator.
Where does this directory's data come from?
x402.new continuously indexes the public x402 discovery network (the Bazaar), normalizes every listing — pricing, payment details, input/output schemas, 30-day usage — and makes it searchable. Usage numbers come from the network's own quality signals.
Ready to explore?
Thousands of live, payable endpoints are indexed right now.