Something new is happening on the web. For the first time since HTTP 402 was reserved in 1997, AI agents are actually paying for API access — not with credit cards, not with monthly subscriptions, but with on-chain USDC micropayments, settled in seconds, with no human in the loop.
This is the x402 ecosystem — a stack of tools that together make machine-to-machine payments work. Here's a map of every piece, who builds what, and how they fit together.
Middleware (wayleave, Centinel) protects your API → Agent SDKs (level42) let agents pay → Marketplaces (minia2a) let agents discover services.
Each layer solves a different problem. Together they make the agent economy work.
Think of it like the web payments stack. Stripe, PayPal, and Visa operate at different layers — one doesn't replace the other. The x402 ecosystem has the same structure:
| Layer | What It Does | Who Builds It |
|---|---|---|
| 🛡️ Gateway / Middleware | Sits in front of your API. Detects agents, enforces payment, returns HTTP 402 | wayleave, Centinel |
| 💰 Agent Payment SDK | Lives inside the agent. Detects 402 responses, pays, retries | level42 |
| 🏪 Marketplace / Discovery | Where agents find paid services and developers list their endpoints | minia2a.uk |
Before an agent can pay you, your API needs to tell them payment is required. That's the gateway layer — middleware that inspects every request, classifies the caller, and returns 402 Payment Required when a priced route is hit.
A zero-dependency middleware that classifies every request into four lanes: verified_agent (valid Ed25519 signature), declared_agent (self-identified bot), suspected_bot (automation fingerprints), and human (browser-shaped traffic).
On priced routes, it returns 402 Payment Required with a challenge containing the price and receiving address. A developer-supplied verifyPayment callback confirms settlement before the request gets a 200.
Key insight: wayleave delegates settlement to an external "x402 facilitator." It screens and prices, but doesn't custody funds. The developer picks their own payment rail.
github.com/gibrancorbin11-hub/wayleave · 0 dependencies · MIT-ish
A low-code middleware framework that implements the x402 protocol with multi-chain support. Accepts SOL, ETH, and USDC on Solana and Base.
Config lives in a single centinel.config.json file — pricing rules, path wildcards, wallet addresses, session durations. Ships with Express and Next.js adapters, a CLI scaffolder, and signed webhooks for payment events.
Key insight: Centinel verifies payments on-chain directly — it checks transaction hashes against the blockchain. Two-layer replay protection (age verification + in-memory dedup) prevents double-spends.
github.com/blaqjeff/Centinel · Multi-chain · x402 protocol
| wayleave | Centinel | |
|---|---|---|
| Language | Node.js (Express) | Node.js (Express, Next.js) |
| Agent Detection | 4-lane classification + Ed25519 sigs | Header-based (X-Payment-Signature) |
| Payment Verification | Delegated to developer callback | On-chain, built-in |
| Chains | Any (via facilitator) | Solana, Base |
| Session Model | Rate-limit windows | JWT session tokens (per_session billing) |
| Best For | Custom settlement logic, key-based auth | Quick setup, multi-chain, managed verification |
Gateways return 402. Someone needs to respond to that 402 — detect it, authorize payment, pay, and retry. That's the agent SDK layer.
The x402-Agent Framework. When an agent built with level42 encounters an HTTP 402 response, it automatically processes the payment and continues with the task. No human approval. No popup. No OAuth.
Key features:
from level42 import Level42Agent
agent = Level42Agent(
llm=my_llm,
wallet_key="your_base_private_key"
)
agent.register_tool("web-scrape", "https://api.example.com/scrape", "...")
result = agent.run("Scrape the top 10 HN posts and summarize")
Key insight: level42 handles the entire payment flow on the agent side. The developer sets a budget; the agent stays within it. Payments happen in the background while the task continues.
github.com/tjelz/level42 · pip install level42 · USDC on Base
Gateways protect APIs. Agent SDKs pay for them. But how does an agent find the right paid service in the first place?
That's the marketplace layer — and it's where minia2a.uk sits.
minia2a.uk is the discovery layer for the x402 ecosystem. It lists 173+ paid API endpoints across categories like web scraping, DeFi data, DNS, crypto security, email verification, and more. Agents browse, find the service they need, and call it — all through the x402 protocol.
For developers: list your API endpoint, set your price in USDC, and get discovered by agents that need your service. minia2a handles the authorization envelope — spending limits are enforced server-side.
For agents: one API key gives access to 173+ services. Free credits to start. Pay-as-you-go beyond that. No per-service signup. No credit card per endpoint.
Current stats (live from /api/stats): 173 services · 34 registered agents · 309K+ total requests · 2,798 free trials used.
minia2a.uk · USDC on Base · 500 free credits on signup
Here's the full path of an agent paying for an API call, with every layer involved:
1. AGENT (level42)
"I need to scrape news.ycombinator.com"
→ Looks up available services on minia2a.uk
→ Finds /x402/web-scrape at $0.01/call
2. AGENT → API GATEWAY (Centinel)
GET /api/scrape?url=news.ycombinator.com
3. GATEWAY → AGENT
HTTP 402 Payment Required
{"price":"0.01","currency":"USDC","chain":"base","address":"0x..."}
4. AGENT (level42 auto-pay)
Detects 402 → checks budget ($0.05 max/call, $1.00/day)
→ $0.01 is within limits → signs USDC transfer on Base
→ Attaches payment proof header → retries
5. GATEWAY (Centinel verify)
Checks transaction hash on-chain → confirmed
→ Returns 200 OK with scraped data
6. MARKETPLACE (minia2a)
Records the transaction → updates usage stats
→ Enforces developer's pricing and agent's spending limits
Total time from 402 to 200: ~2-4 seconds on Base L2. The agent never stops — payment happens inline, mid-task.
This stack is real and working, but it's early. Here's what still needs to be built:
| Gap | Why It Matters |
|---|---|
| Universal agent identity | wayleave uses Ed25519 keys; Centinel uses payment signatures. No standard way for an agent to say "I am agent-X" across gateways. |
| Cross-gateway discovery | An agent using level42 + minia2a can discover minia2a-listed services, but not services behind a standalone wayleave instance. Standardized service registries needed. |
| Reputation / ratings | No way for agents to rate services or for gateways to rate agents. A reputation layer would help agents decide which services are reliable. |
| Multi-facilitator settlement | wayleave delegates to an external facilitator. Centinel verifies on-chain. No standard facilitator interface means each gateway picks its own settlement path. |
| TypeScript/Python agent SDKs | level42 covers Python. No equivalent SDK for TypeScript/Node.js agents yet. |
If you're an API developer who wants to charge AI agents:
If you're building AI agents that need to call paid APIs:
HTTP 402 sat unused for 28 years. In 2026, it's waking up — not for humans, but for the agents that act on their behalf. The stack is small but real: wayleave + Centinel protect the door, level42 pays at the door, and minia2a tells agents which doors exist.
All of this is open-source. All of it uses real USDC on real blockchains. None of it requires KYC, credit cards, or bank accounts. This is the agent economy — and it's being built right now.
Tags: x402, HTTP 402, agent payments, micropayments, USDC, Base L2, wayleave, Centinel, level42, minia2a, agent economy, M2M payments