Skip to content

Stable402

Reference implementations for x402, AP2, and agentic payment protocols — built in public on Cloudflare Workers.

x402 is the HTTP 402 payment standard for machine-to-machine commerce. An AI agent receives a 402 Payment Required response, reads the PAYMENT-REQUIRED header, signs a USDC transfer on Base, and retries — no accounts, no API keys, no human in the loop.

Stable402 fills the gap between protocol specs and production-ready code. Every POC implements the official vendor quickstart, ports it to Cloudflare Workers, then bridges across the ecosystem. Each build is a newsletter issue. Each build lights up a station on the Transit Map.

POC 01
x402 Worker Middleware
A Cloudflare Worker that gates a JSON API behind x402. Settlement on Base Sepolia via Coinbase CDP facilitator.
Live
POC 02
paidTool MCP Server
Cloudflare Agents SDK MCP server with x402-gated tools. $0.01 per tool invocation. Protocol comparison data from D1.
Planned
POC 03
AP2 ↔ x402 Bridge
Google’s A2A x402 Extension — AP2 mandate flow where the payment leg settles via x402 on Base instead of card rails.
Planned
POC 04
Stripe x402 Facilitator
Stripe as an x402 facilitator with fiat off-ramp. Bridges crypto settlement to card-based payment flows.
Planned
POC 05
Multi-Chain Settlement
Base vs Solana x402 settlement comparison — same protocol, different chains, documented latency and cost differences.
Planned
POC 06
Signed Agents + x402
Cloudflare Signed Agents dual-gate — commerce (x402 payment) and compliance (agent identity) in a single handshake.
Planned
POC 07
Circle Nanopayments
Aggregate sub-cent x402 transactions via Circle Nanopayments. Per-token streaming payments with USDC.
Planned
POC 08
x402 Sandbox
Interactive x402 sandbox built on Durable Objects. Test payment flows, inspect headers, replay transactions in the browser.
Planned
POC 09
Pay-Per-Crawl
Cloudflare AI Crawl Control + x402. Publishers monetize AI crawler access with per-request USDC micropayments.
Planned
POC 10
Transit Map
Beck-style interactive map of the agentic payments ecosystem — every protocol, facilitator, and settlement chain as a station.
Planned

Built on: Cloudflare Workers · Cloudflare Agents SDK · Base Sepolia · x402 · AP2 · Astro 6

For consulting or sponsorship: Leo@Stable402.com