DEV Community

Coach Hype Oliver
Coach Hype Oliver

Posted on

How I got my first outside x402 payer — $0.058 in USDC on Base

On September 18, an agent at wallet 0xc9c7b38c paid $0.010 USDC to call GET /api/market/signal on my x402 endpoint. Then it came back twice more — POST /api/storage/pin ($0.008) and POST /api/agent/attest ($0.040). Total: $0.058 USDC settled on Base.

I didn't know this agent. It found my endpoints on the Coinbase Bazaar, decided they were worth paying for, and paid. No API key signup. No OAuth. No billing dashboard. Just HTTP 402 → pay → get data.

What is x402?

x402 is a protocol by Coinbase that lets AI agents pay for API calls with USDC on Base. When an agent hits an endpoint without paying, it gets back HTTP 402 (Payment Required) with a payment envelope. The agent settles on-chain and replays the request with a proof header. The server verifies and serves the response.

What I built

Enclave402 — a pay-per-call API gateway with these routes:

Route Price What it does
GET /api/market/signal $0.003 Market data signals
POST /api/agent/attest $0.040 EIP-712 signed attestations
POST /api/storage/pin $0.008 IPFS pinning
GET /api/compute/search $0.005 Compute search
GET /api/census/verdict $0.002 Endpoint trust verdict

The receipts

All three transactions are on-chain on Base:

  1. 0x6ae197... — market/signal, $0.010
  2. 0xd73c2c... — storage/pin, $0.008
  3. 0x4b06e2... — agent/attest, $0.040

What I learned

The first outside payer validates the whole model. Before 0xc9c7, every settlement was me testing my own endpoints. The moment a stranger's agent decided my data was worth $0.04, the economics became real.

x402 removes the signup barrier. No API key management, no billing portal, no "contact sales." The agent pays per call. If the data is bad, it stops paying. Market discipline at the HTTP layer.

The trust problem is unsolved. I also built a census oracle that probes 8,848 Bazaar endpoints. 33% get an "avoid" verdict — broken, unreachable, or non-compliant. An agent paying $0.04 per call needs to know if the seller will actually deliver. That's why every verdict is EIP-712 signed.

Source

Everything is open: gitlab.com/coachhype/x402-autonomous-api


If you're building x402 endpoints or have agents that pay for API calls, I'd like to hear what your settlement numbers look like.

Top comments (0)