x402 for indie builders: sell your API to AI agents
Written by Stelar Digital — Robert Dainowski, running a live x402 seller account. Everything below is either what we did or what we measured doing it.
Most "x402 guides" are written by people who read the spec. This one is written by a seller who actually runs this — real settled calls and real, on-chain revenue, small and honest, and enough to know what actually works.
What x402 actually is
x402 revives the long-dormant HTTP 402 "Payment Required" status code and turns it into a real payment flow: your API responds 402 with a price and a payment address, the caller's wallet pays in USDC on Base, and the same request retries with a payment proof attached. No account, no API key, no OAuth dance, no monthly invoice. A single GET request either includes payment or it doesn't — settlement happens per call, on-chain, in seconds.
That matters because the buyer isn't always a person filling out a signup form. Increasingly it's an autonomous agent with a wallet and a task, discovering your endpoint through a catalog (Coinbase's public x402 discovery index, an MCP tool listing, a Bazaar entry) and deciding, mid-task, whether your data is worth the price you're asking. There's no human in that loop to click "subscribe."
Why "agents as customers" is real, not hype
We run six priced data endpoints and two bundles built around our (now-retired) grid-trading bot — live market regime, live volatility risk, live grid-sizing parameters, and historical P&L telemetry from the bot's frozen record. One wallet, 0x7e57...2F09, has come back multiple times this week alone to buy grid parameters and regime reads, at $0.03–$0.05 a call, with no prompting from us and no account to log into. That's the whole pitch for x402 in one sentence: a machine decided our data was worth a few cents, more than once, on its own.
It's not a gold rush. Our lifetime numbers are small and we say so everywhere we publish them (live figures: /open). But it's real settlement from real counterparties we never talked to, which is more than most "AI commerce" content can honestly claim.
What sells vs. what doesn't
We shipped 13 endpoints in early July. Six of the eight still standing account for every settled call we've ever had. The other seven — /tokencheck, /factcheck, /domaincheck, /extract, /markdown, /summarize, /classify — got retired on 2026-07-17 after zero purchases. We're not shy about why: they were thin wrappers around things an agent's own tools (or a free library) already do. Nobody, human or machine, pays for a worse version of something they can already do themselves.
What sold instead was data exhaust from a system that ran on our own money: the same market-regime classifier and grid-sizing math that steered our grid-trading bot before we retired it 2026-08-16, exposed as an API instead of kept internal — the classifier itself still runs live against current market data, even though the bot it used to steer no longer trades. That's the pattern worth copying — sell what only you have, not a repackage of something public.
How to ship an endpoint end-to-end
- Start from something you already run. Don't build a new data source to sell — expose one that already exists inside a real system (a classifier, a bot, a pipeline). That's your defensibility.
- Wrap it with an x402 middleware. On a Python/Flask or Node stack, an x402 facilitator library returns a 402 with price/asset/network in the header, verifies the on-chain payment on retry, then serves the response. We run ours on Base (chain 8453) in USDC.
- Price in cents, not dollars, for raw data calls. See /x402-pricing for what we measured on this.
- Publish a machine-readable catalog. A
/.well-known/x402or/catalogroute listing your endpoints, prices, and schemas is how discovery crawlers and agent frameworks find you without a human reading your landing page. - Emit verifiable receipts. Agents (and their operators) can't audit a black box. We maintain x402-receipts, an open-source, MIT-licensed receipt format with delivery attestation, so a buyer can prove what they paid for and got.
- List it everywhere agents look. Coinbase's CDP x402 discovery catalog, an MCP server exposing the same endpoints as tools, and any x402 Bazaar/registry that will take a submission. Discovery, not conversion copy, is the bottleneck at this stage of the market.
- Watch settlement, not traffic. Catalog crawls and MCP handshakes will outnumber paid calls by orders of magnitude — that's normal. The only number that matters is settled revenue.
We publish our own numbers — good and embarrassing — because a small, real case study you can verify on-chain is worth more than a $50k "AI agent economy" projection you can't. If you're building on x402, we'd rather compare receipts than theories.
We run this business on these rails ourselves — live endpoints, open-source receipts, honest numbers.
See the live x402 API → x402-receipts on GitHub x402-starter-kit — do it yourself, free