Quartermaster

What is x402?

x402 is an open protocol that lets any HTTP endpoint charge for a request — per call, in stablecoins, with no accounts and no API keys. It finally puts HTTP's long-dormant 402 Payment Required status code to work.

The whole protocol in two requests

1
Call the endpoint. The server answers 402 Payment Required with a PAYMENT-REQUIRED header: base64 JSON naming the price, the asset (usually USDC), the network (usually Base), and the wallet to pay.
2
Pay and retry. Your client signs a USDC payment authorization and retries the same request with a PAYMENT-SIGNATURE header. The server verifies and settles it on-chain (under a cent of gas), then returns 200 with the data — plus a PAYMENT-RESPONSE header receipt.

That is the entire checkout. No signup form, no API-key dance, no subscription. Client libraries like @x402/fetch handle the loop automatically — wire a wallet up once and every x402 API on the internet works the same way. That is what makes it the natural payment rail for AI agents: an agent with a funded wallet can discover, pay for, and use a tool in seconds, unattended.

See a real 402 challenge right now

curl -i https://quartermaster.surewhynot.app/v1/http-errors/429
# HTTP/2 402
# payment-required: eyJ4NDAyVmVyc2lvbiI6Miw... (base64 JSON: price, network, payTo)

Want it decoded and lint-checked instead of raw? Paste any endpoint into the free x402 Inspector — no wallet needed. It understands both rails in use today: USDC on Base (eip155:*) and USDC on Solana (solana:*).

Common questions

Why not just use API keys and Stripe?

Keys and subscriptions assume a human doing signup and card entry. Agents cannot do that well, and micro-amounts (a tenth of a cent) do not survive card fees. x402 gives machine-readable prices, cryptographic payment, and per-call granularity.

What do I need to pay an x402 API?

A wallet with a few dollars of USDC on Base and any x402 client library. Use a burner wallet, never your main one. The buyer quickstart walks through it with a runnable script.

How do sellers get discovered?

Settlements carrying discovery metadata are indexed automatically into catalogs like the Coinbase Bazaar, so agents can search for tools by capability. Run the Settlement Assurance or x402-audit checks to see whether an endpoint (yours or anyone's) is set up right.

Try it on Quartermaster

This site is a working x402 seller: 30+ tools priced $0.001–$0.03 per call, a 49-tool MCP server for Claude and Cursor, free endpoints to poke without a wallet, and a public status page with a real settled payment every day.