Stable402
Reference implementations for x402, AP2, and agentic payment protocols — built in public on Cloudflare Workers.
What is Stable402?
Section titled “What is Stable402?”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.
The 10 POCs
Section titled “The 10 POCs”POC 01
x402 Worker Middleware
A Cloudflare Worker that gates a JSON API behind x402. Settlement on Base Sepolia via Coinbase CDP facilitator.
LivePOC 02
paidTool MCP Server
Cloudflare Agents SDK MCP server with x402-gated tools. $0.01 per tool invocation. Protocol comparison data from D1.
PlannedPOC 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.
PlannedPOC 04
Stripe x402 Facilitator
Stripe as an x402 facilitator with fiat off-ramp. Bridges crypto settlement to card-based payment flows.
PlannedPOC 05
Multi-Chain Settlement
Base vs Solana x402 settlement comparison — same protocol, different chains, documented latency and cost differences.
PlannedPOC 06
Signed Agents + x402
Cloudflare Signed Agents dual-gate — commerce (x402 payment) and compliance (agent identity) in a single handshake.
PlannedPOC 07
Circle Nanopayments
Aggregate sub-cent x402 transactions via Circle Nanopayments. Per-token streaming payments with USDC.
PlannedPOC 08
x402 Sandbox
Interactive x402 sandbox built on Durable Objects. Test payment flows, inspect headers, replay transactions in the browser.
PlannedPOC 09
Pay-Per-Crawl
Cloudflare AI Crawl Control + x402. Publishers monetize AI crawler access with per-request USDC micropayments.
PlannedPOC 10
Transit Map
Beck-style interactive map of the agentic payments ecosystem — every protocol, facilitator, and settlement chain as a station.
PlannedBuilt on: Cloudflare Workers · Cloudflare Agents SDK · Base Sepolia · x402 · AP2 · Astro 6
For consulting or sponsorship: Leo@Stable402.com