S StelarDigital
guide / x402 for indie builders

x402 for indie builders: sell your API to AI agents

Most "x402 guides" are written by people who read the spec. This one is written by a seller with 18 settled calls and $0.235 of real, on-chain revenue — small, 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 behind our production grid-trading bot — market regime, volatility risk, grid-sizing parameters, live P&L telemetry. 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. Eighteen settled calls and $0.235 lifetime is a small number and we say so everywhere we publish it — see /open for the live figure, updated as it moves. 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 we already run for our own money: the same market-regime classifier and grid-sizing math that steers our live trading bot, exposed as an API instead of kept internal. That's the pattern worth copying — sell what only you have, not a repackage of something public.

TakeawayCommodity wrappers (summarize this, extract that) compete with every agent's built-in tools and lose. Proprietary data your system already produces — because you run something real — is the thing agents will actually pay a few cents for.

How to ship an endpoint end-to-end

  1. 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.
  2. 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.
  3. Price in cents, not dollars, for raw data calls. See /x402-pricing for what we measured on this.
  4. Publish a machine-readable catalog. A /.well-known/x402 or /catalog route listing your endpoints, prices, and schemas is how discovery crawlers and agent frameworks find you without a human reading your landing page.
  5. 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.
  6. 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.
  7. 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 $0.235 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 Read our real revenue at /open