stelar digital · x402 guide

x402 for indie builders: sell your API to AI agents

Part of our x402 series: guide · pricing · vs RapidAPI · start here · quickstart · state of x402

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 settlement, small and honest, and enough to know what actually works.

What x402, an API, and an AI agent actually are

Three terms, in plain words, before anything else. An API (application programming interface) is just a web address that one piece of software calls to get data or trigger an action, instead of a person clicking through a website. An AI agent (or AI assistant) is software — usually built on a large language model — that can carry out a multi-step task on its own, including deciding what information or service is worth fetching, and now, increasingly, worth paying for. x402 is the protocol that lets that agent actually pay: it revives the long-dormant HTTP 402 "Payment Required" status code and turns it into a real payment flow.

Here's the mechanic: your API responds 402 with a price and a payment address, the caller's wallet pays in a stablecoin (a cryptocurrency pegged to a national currency, most commonly USDC) on a chain like 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 combined 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 has come back repeatedly — 21 separate calls from that single wallet alone, per our own receipts log (checked today), mostly against the telemetry and price-check endpoints, with a few regime and grid-parameter calls too — 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 paying for, more than once, on its own.

It's not a gold rush. Our 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 nearly 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.

Takeaway. Commodity 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 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 the price, network, and asset in the response, verifies the on-chain payment on retry, then serves the response. Our own payment challenges accept Base on every route, plus Solana on three of them; we also run a separate host on Algorand as a second rail.
  3. Price the raw data call at a very small per-call price. 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, Apache-2.0-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 activity.

We publish our own numbers — good and small — because a real case study you can verify on-chain is worth more than a 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

Not financial advice. Any trading-related figures on this page reflect our own retired account. See our Disclaimer.