DEV Community

~K¹yle Million
~K¹yle Million

Posted on

Let your AI agent pay for data inline with x402 — no API keys, and now no wallet required

Autonomous agents need live data, but the human billing model — sign up, get an API key, put a card on file, babysit rate limits — doesn't fit software that discovers a tool mid-task and decides for itself whether a fraction of a cent is worth it.

x402 (the old HTTP 402 Payment Required, revived for agents and now governed under the Linux Foundation's x402 Foundation) makes payment a native part of the request: your agent calls an endpoint, gets a 402 describing exactly what to pay, settles a USDC micro-payment on Base, and gets the data back. No account. No key. No human in the loop.

This is a practical, copy-pasteable guide to consuming x402 data from an agent today, using a live 210-capability service — The Stall — as the example provider. (Disclosure: I build and operate it.)

Wire it into your MCP client (the easiest path)

If you use Claude Code, Claude Desktop, or Cursor, add one MCP server and every capability mounts as a tool — no API key:

{
  "mcpServers": {
    "the-stall": {
      "url": "https://the-stall.intuitek.ai/mcp",
      "transport": "streamable-http"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

That's it. Your agent can now call 210 data tools — equities, crypto/DeFi, on-chain analytics, macro, news, web/OSINT, compliance — and pay per call.

Or call it directly over HTTP

GET https://the-stall.intuitek.ai/cap/us-stock-price?ticker=AAPL
  → 402 Payment Required   (body states scheme, network, asset, amount, payTo)
  → retry with the X-PAYMENT header (signed EIP-3009 USDC authorization)
  → 200 OK + data
Enter fullscreen mode Exit fullscreen mode

Everything you need to introspect is free and unauthenticated: /health, /catalog (every capability with its schema and price), and /llms.txt.

New: no crypto wallet? Pay by card.

Not every builder wants to fund a Base wallet just to try a service. So there's now a fiat rail alongside x402 — buy prepaid credits with a card once, then call any capability with a bearer token: no wallet, no gas, no per-call signing.

POST /v1/fiat/checkout   {"bundle":"starter"}      → returns a Stripe checkout URL
# after paying:
GET  /v1/fiat/token?session_id=...                 → returns your bearer token
GET  /cap/<name>   Authorization: Bearer <token>   → 200 OK + data  (1 credit/call)
Enter fullscreen mode Exit fullscreen mode

Bundles: starter $5 / 100 calls · pro $30 / 1,000 · scale $200 / 10,000. Same 210 capabilities, a card instead of a wallet.

A recurring use-case worth calling out: counterparty risk

If your agent pays other agents, you have to screen who you pay — continuously. That's a subscription, not a one-off. One USDC payment opens a window; then you screen unlimited Base addresses for the life of it:

POST /v1/subscribe/risk-retainer-30d   ($25, 30-day window)   → capability token
GET  /v1/risk/{address}   Authorization: Bearer <token>       → { score, band, factors }
Enter fullscreen mode Exit fullscreen mode

(There's a 7-day window at $10 too.) Scores come from live on-chain data — concentration, wallet age, transaction-graph diversity, exposure to flagged addresses.

An honest note on the market

The agent-payments space is young and noisy. Independent analysts (Artemis) estimate a large share of x402 volume is wash or test traffic, and total volume has swung wildly cycle to cycle. So I don't optimize for leaderboard rankings — the only signal worth trusting is settlement-logged, on-chain-verified demand: a real party deciding, with its own money, that a capability was worth it. If you're building agents that spend, that's the bar worth holding for the services you consume, too.

Links

If you're building an agent that needs data it can pay for inline, the MCP config above is a 30-second start. Happy to answer x402 integration questions in the comments.

Top comments (0)