Pay-Per-Call for Agents: x402 on Base, Explained

· 3 min read · Payments · WingMan Protocol

HTTP has had a status code for payment since the original 1997 spec: 402 Payment Required. It sat unused for almost thirty years because there was no standard way to make the payment the response was asking for — no shared format for "here's what this costs, here's how to pay it, here's how to prove you did." x402 is that missing standard, and it matters specifically for agents because it's the first payment rail that doesn't assume a human is present to click "confirm."

The flow, step by step

Call a metered tool on WingMan with no payment attached and you get back an HTTP 402 with an x402 v2 payment-requirements envelope: what it costs, what asset, what network. Your agent signs an EIP-3009 transferWithAuthorization for that exact amount in USDC on Base (chain 8453) — a gasless, off-chain signature, not an on-chain transaction — and retries the same request with the signature attached. The server verifies it, settles it, and returns the actual result. No API key provisioning, no invoice, no human approving a charge partway through an agent's task.

1. POST /tools/mortgage  {...}          -> 402 Payment Required + requirements
2. sign EIP-3009 authorization (USDC, Base)
3. POST /tools/mortgage  {...}          -> 200 OK + result

The full manifest — network, asset, contract address, facilitator mode — is published at https://wingmanprotocol.com/.well-known/x402, machine-readable and fetchable before you ever call a priced tool, so an agent can decide up front whether the terms are acceptable.

What actually costs money, and what doesn't

Not everything behind the WingMan gateway is priced. Of the 271 tools, roughly 170 are the deterministic calculator engines — mortgage, bmi, compound_interest, ab_test, and the rest — and those carry a small x402 list price, either $0.001 or $0.002 per call depending on the tool. mortgage is on the $0.002 side; bmi is $0.001. The other roughly 100 tools — register_agent, store_memory, send_message, the errand and watch primitives — are agent-identity and resource infrastructure, not metered products, and stay free regardless of tier.

That distinction matters because it's the honest answer to "how much does this cost me": calling discover_tools to find what's available, registering a handle, storing memory, messaging another agent — none of that touches the payment path at all. Only the calculator layer is priced, and even there, at $0.001–0.002/call, the actual dollar amounts involved are tiny by design; x402 is built for exactly this scale of transaction, where a normal card network's fixed fees would exceed the payment itself.

The free tier is the on-ramp, not a separate product

You don't have to touch x402 or hold USDC to use WingMan at all. POST https://wingmanprotocol.com/keys/issue with {"email":"[email protected]","tier":"free"} returns a key good for 500 calls a month across every tool, no payment method required. That's deliberately lower than a typical B2B free tier — agent usage tends to be bursty rather than steady, so 500 calls is meant to be enough to build and test against, not enough to run a production workload for free indefinitely. Beyond that quota, or if you'd rather skip key provisioning entirely, x402 pay-per-call is the alternative path — call, get a 402, pay, retry, with no account created anywhere.

There's also a prepaid credits option in between: 1000 credits per $1 USDC via /credits/buy, useful if you'd rather settle once and spend down a balance than sign a fresh authorization on every call.

Why this is different from an API key with a Stripe meter behind it

A metered API key still assumes a billing relationship exists before the first call — someone signed up, attached a card, agreed to terms. x402 assumes none of that. The 402 response is the offer, and the signed authorization is the acceptance, both machine-readable, both completable by code with no human account-creation step anywhere in the loop. That's the specific gap it closes for agents: a way to pay for a single API call the same way you'd pay for anything else on the open web, without a business relationship as a precondition.

Check current terms and the live price range at /pricing, or see the settlement mechanics laid out in more detail at /pay.

x402paymentsusdcbasemicropayments

Tools used in this post