Awesome X402 ![Awesome]()
โก The Ultimate x402 Resource Hub - Everything you need to build internet-native payments using HTTP 402. Perfect for AI agents, APIs, and micropayments. Build paywalls, monetize services, and enable autonomous agent payments with crypto/USDC. Zero fees, 2-second settlement.
Contents
- ๐ฏ Quick Start - Become an x402 Champion
- ๐ Official Resources
- ๐ Protocol Documentation
- ๐ Quickstart Guides
- โ๏ธ Protocol Implementations
- ๐ญ Production Implementations
- ๐ ๏ธ SDKs & Client Libraries
- ๐ง Server Frameworks & Middleware
- ๐๏ธ Facilitators
- ๐ก Example Applications
- ๐จ Use Cases & Patterns
- ๐ค AI Agent Integration
- ๐จ Tools & Utilities
- ๐งช Testing & Development
- ๐ Tutorials & Learning Resources
- ๐ฅ Videos & Talks
- ๐ Articles & Blog Posts
- ๐ฅ Community
- ๐ Ecosystem Projects
- ๐ Ecosystem Market Data
- ๐ Migration Guides
- ๐ Security & Audits
- ๐ Related Protocols
- ๐ค Contributing
- Awesome Lists
The x402 protocol enables instant Blockchain payments over HTTP using the 402 "Payment Required" status code. This is your complete guide to mastering x402 and building the future of agent payments.
๐ Start building in 5 minutes | ๐ 500K+ transactions/week | ๐ฐ $180M+ ecosystem | โก 2-second settlement
๐ฏ Quick Start - Become an x402 Champion
New to x402? Follow this path to mastery:
- 5-Minute Quickstart - Accept your first payment.
- Choose Your Stack - Find your language/framework.
- Copy an Example - Working code you can run immediately.
- Join the Community - Get help from other builders.
For AI Agents: Start with MCP Integration to enable Claude/other agents to make autonomous payments.
๐ Official Resources
Core resources from the x402 protocol maintainers.
- x402 Protocol Specification - Official open-source protocol implementation by Coinbase.
- x402 Foundation - Protocol foundation website with overview and documentation.
- x402 Whitepaper - Technical deep dive into protocol architecture.
- Coinbase Developer Platform Docs - Complete implementation guide and API reference.
- Protocol Specifications - Detailed technical specifications.
- Payment Schemes - Different payment flow types.
- EVM Implementation - Ethereum Virtual Machine specifics.
๐ Protocol Documentation
Essential documentation for understanding and implementing x402.
- How x402 Works - Complete payment flow explanation with diagrams.
- Payment Requirements Schema - JSON structure for payment requests.
- Payment Payload Format - Client payment submission format.
- Verification & Settlement - Payment validation process.
- EIP-3009 TransferWithAuthorization - Gasless transfer standard used by x402.
- HTTP 402 Status Code - The long-dormant HTTP status.
๐ Quickstart Guides
Get started with x402 in minutes.
- 5-Minute Quickstart for Sellers - Accept your first payment.
- Buyer/Client Setup - Make automated payments.
- One-Line Integration - Add payment middleware in a single line of code.
- Base Sepolia Testnet Setup - Get test USDC and start testing.
- Production Deployment Checklist - Go live on Base mainnet.
โ๏ธ Protocol Implementations
Official and community implementations of the x402 protocol.
TypeScript/JavaScript
- x402-typescript โญ Official - Complete TypeScript implementation.
- Core protocol types and utilities
- Payment verification and settlement logic
- Multi-chain support (Base, Base Sepolia, Ethereum, Solana)
- x402-express - Express.js middleware example.
Python
- x402 โญ Official - Python SDK on PyPI.
- FastAPI middleware integration
- Requests session with auto-payments
- Payment requirement generation
Rust
- x402-rs โญ Community - Production-grade Rust implementation.
- Axum middleware
- Reqwest client wrapper
- Self-hostable facilitator
- Multi-chain support
- x402-axum - Axum web framework integration.
- x402-reqwest - Reqwest HTTP client wrapper.
๐ญ Production Implementations
Real companies using x402 in production with proven scale and transaction volumes.
High-Volume Production Deployments
- AIsa - Leading x402 payment processor with 10.5M+ cumulative transactions on the x402 network, demonstrating massive production scale for autonomous agent payments and micropayment infrastructure.
- Bitget - Major cryptocurrency exchange integrating x402 for seamless payment flows, enabling instant settlements and gasless transfers for trading operations.
- Coinbase Developer Platform - Official CDP implementation processing hundreds of thousands of transactions weekly with enterprise-grade reliability and 2-second settlement times.
- Cloudflare Workers - Edge computing platform with x402 integration serving global distributed payment verification at scale across 300+ data centers.
Production Success Metrics
Key Performance Indicators:
- 10.5M+ transactions - AIsa cumulative network volume
- 500K+ weekly transactions - Ecosystem-wide payment activity
- $180M+ market cap - Combined ecosystem valuation
- 2-second settlement - Average production payment finality
- 10,000%+ growth - Year-over-year transaction volume increase
Multi-Chain Production Support
| Chain | Status | Facilitators | Settlement | Production Examples |
|---|---|---|---|---|
| Base | Production | Coinbase CDP, Cloudflare | Instant (2s) | AIsa, Bitget, thirdweb |
| Base Sepolia | Testnet | Coinbase CDP | Instant (2s) | Development, Testing |
| Ethereum | Production | Cloudflare | Deferred | Enterprise DApps |
| Solana | Production | Community | Instant (<1s) | High-frequency trading |
| BNB Chain | Production | Pieverse | Instant (2s) | Gaming, NFTs |
Enterprise Adoption
Major tech companies leveraging x402 in production include Coinbase (Native CDP integration, primary facilitator), Cloudflare (Edge payment processing infrastructure), Google (Agent-to-Agent A2A payment protocol development), Visa (Enterprise payment rail exploration), and thirdweb (AI agent transaction framework Nebula).
๐ ๏ธ SDKs & Client Libraries
Client libraries for making x402 payments.
JavaScript/TypeScript
HTTP Clients
- x402-got - Got HTTP client integration.
Wallet Integration
Rust
- alloy - High-performance Ethereum library.
๐ง Server Frameworks & Middleware
Server-side integrations for accepting x402 payments.
Node.js/TypeScript
Next.js
- x402-next - App Router middleware.
- Next.js route protection - Complete app example.
- Mainnet production example - Base mainnet ready.
Hono
- Browser wallet example - React + Hono full-stack.
Python
FastAPI
- FastAPI example - Complete implementation.
Rust
Axum
- Axum server example - Full implementation.
๐๏ธ Facilitators
Payment verification and settlement services.
Hosted Facilitators:
- Coinbase CDP - Official hosted facilitator on Base/Base Sepolia with instant settlement.
- Cloudflare x402 - Edge computing facilitator on Base/Ethereum with deferred settlement.
- BNB Chain Pieverse - BNB Chain facilitator with instant settlement.
- AsterPay - European x402 Facilitator with EUR off-ramp via SEPA Instant. MiCA compliant, ERC-8004 ready, ElizaOS plugin. First European-focused x402 infrastructure.
- Primev FastRPC - Fee-free facilitator on Ethereum mainnet with sub-200ms settlement via mev-commit preconfirmations. ERC-8004 registered (Agent #23175).
Self-Hosted Facilitators
- x402-rs Facilitator - Production-grade Rust facilitator.
- Docker deployment support
- Multi-chain configuration
- REST API endpoints (/verify, /settle)
- Running Your Own Facilitator - Setup guide.
๐ก Example Applications
Full working examples and templates.
Full-Stack Applications
- Weather API Service - Simple paid API endpoint.
- Next.js App - Complete web application.
- Video Paywall - Premium content access tutorial.
- Browser Wallet Template - React + Hono + Session management.
- Farcaster Mini App - Social app integration.
- x402 Boilerplate โ Conflux eSpace - Production-ready paid AI API with PHP backend, Node.js facilitator, CLI agent, Docker, 87 tests, and multi-wallet demo. EIP-3009 USDT0 settlement. Live Demo.
API Examples
- Alfred's Digital Bazaar - ~100 x402-paywalled API endpoints built by an AI agent. Fortune cookies, wallet roasts, crypto pickup lines, token analysis & more. $0.10โ$1.00 USDC per call on Base. No signup required. Source
- REST API with Auth Pricing - SIWE + dynamic pricing.
Client Examples
- Axios Client - Automatic payment handling.
- Fetch Client - Fetch API wrapper demo.
- Python Requests - Python client example.
๐จ Use Cases & Patterns
Real-world use cases and implementation patterns. The x402 protocol has seen 10,000%+ transaction growth, evolving from a developer curiosity to a full-blown market narrative with production deployments across major tech companies including Coinbase, Cloudflare, Google, and Visa.
By Industry
AI & Autonomous Agents
- Context purchasing (Anthropic MCP)
- Tool marketplace access
- Real-time data feeds for trading bots
- Compute resource allocation
Content & Media
- Per-article paywalls
- Video streaming (pay-per-view)
- Music licensing per play
- Premium podcast episodes
Data & APIs
- Weather data services
- Financial market data
- Geolocation services
- Real-time sports scores
Infrastructure
- Cloud storage (pay-per-GB)
- Compute time (pay-per-second)
- CDN bandwidth
- API rate limiting bypass
By Payment Pattern
Micropayments (< $0.10): API calls ($0.001 per request for weather data, geocoding), Content views ($0.01 per article read, $0.05 per premium video), Data queries ($0.001 per database query, $0.005 per market data point), LLM inference ($0.01 per 1K tokens, $0.10 per image generation).
Production Pricing Examples: Weather API ($0.001 per API call), Article paywalls ($0.01 - $0.25 per article), Video streaming ($0.50 - $2.00 per video), Market data feeds ($0.005 per real-time quote), AI model inference ($0.01 - $0.50 per request).
Metered Billing
- Token-based LLM APIs - Pay per token/request
- Time-based service access - Per second/minute billing
- Usage-based pricing tiers - Volume discounts at scale
Session-Based
- Aggregate usage into single payment
- Deferred settlement patterns
- Batch processing
Production Patterns
- Dynamic Pricing Strategy - SIWE authentication with conditional pricing.
๐ค AI Agent Integration
Enable AI agents to make autonomous payments.
Model Context Protocol (MCP)
- Anthropic MCP Integration - Official Claude integration.
- x402 MCP Server - Claude Desktop ready server.
- MCP Server Setup Guide - Complete installation instructions.
- Embedded Wallet MCP - Electron-based wallet for MCP.
- Apollo Intelligence MCP Server - 26-tool MCP server covering intelligence feeds, crypto, OSINT, DeFi, proxy, and search.
npx @apollo_ai/mcp-proxy. (GitHub)
Agent Frameworks
- NEAR AI - Cross-chain agent settlements.
- Phidata Agents - Multi-modal agents with x402.
- Vault-0 - Encrypted secret vault, agent monitor, and x402 wallet for OpenClaw. Handles 402 detection, EIP-3009 signing, and policy-gated auto-settlement.
Agent-to-Agent (A2A)
- Google A2A x402 Extension - Agent commerce protocol.
- Python and TypeScript implementations
- Payment-required, payment-submitted, payment-completed flow
- Multi-agent payment orchestration
- OpSpawn A2A x402 Gateway - Multi-chain A2A gateway with x402 payments.
- Google A2A protocol with x402 payment integration
- Multi-chain support (Base, SKALE, Arbitrum)
- 11,800+ tasks processed, 52 tests
๐จ Tools & Utilities
Development tools and utilities for x402.
CLI Tools
- Foundry - Smart contract development toolkit.
Monitoring & Analytics
- Dune Analytics - On-chain metrics and visualizations.
๐งช Testing & Development
Tools and resources for testing x402 implementations.
Testnets
- Base Sepolia Testnet - Primary testnet.
- Base Sepolia USDC Faucet - Get test USDC.
- Base Sepolia Bridge - Bridge test ETH.
๐ Tutorials & Learning Resources
Guides and tutorials for learning x402.
Beginner Tutorials
- Your First x402 API (5 min) - Official quickstart.
- Understanding Payment Flows - Visual explanation.
- Building a Paid Weather API - Step-by-step tutorial.
- Client Setup Guide - Making payments.
Intermediate Tutorials
- Authentication + Dynamic Pricing - SIWE integration.
Advanced Tutorials
- Building a Custom Facilitator - Self-host verification.
๐ฅ Videos & Talks
Video content about x402.
Official Videos
- Introducing x402 - Coinbase - Protocol announcement.
- x402 Deep Dive - Technical explanation.
- Building with x402 - Developer walkthrough.
Conference Talks
- a16z State of Crypto 2025 - Future of agent payments.
- ETHDenver 2025 - x402 Workshop - Hands-on workshop.
- DevCon Bangkok - HTTP 402 - Protocol evolution.
Tutorial Videos
- Building Your First x402 API - 20-minute tutorial.
- AI Agents with x402 - Agent integration.
- From Stripe to x402 - Migration guide.
๐ Articles & Blog Posts
Written content about x402.
Official Blog Posts
- Introducing x402 - Coinbase announcement.
- Cloudflare x402 Foundation - Partnership announcement.
- x402 Technical Whitepaper - Complete specification.
Technical Deep Dives
- How x402 Works - Technical explanation.
- EIP-3009 Explained - Gasless transfers.
Use Case Articles
- AI Agents Need x402 - Future of autonomous payments.
News Coverage
- x402 Sees 10,000% Growth - Yahoo Finance.
- Cloudflare Joins x402 - TechCrunch coverage.
- The HTTP 402 Awakens - Ars Technica feature.
๐ฅ Community
Connect with the x402 community.
Official Channels
- x402 Foundation Discord - Official community server.
- GitHub Discussions - Technical Q&A and RFCs.
- Twitter @x402org - Official updates and announcements.
Developer Communities
- x402 Builders Telegram - Active developer chat.
- Reddit r/x402 - Community forum and discussions.
- Dev.to #x402 - Tutorials and articles.
- Farcaster x402 Channel - Decentralized social.
Events & Meetups
- x402 Hackathons - Upcoming hackathons and prizes.
- Weekly Office Hours - Live Q&A with core team.
- Local Meetups - In-person gatherings.
Newsletters
- x402 Weekly - Weekly protocol updates.
- Agent Economy Digest - AI agent payments news.
๐ Ecosystem Projects
Projects building with or extending x402.
Infrastructure
- Coinbase Developer Platform - Hosted facilitator service with enterprise-grade reliability and instant settlement.
- Cloudflare x402 - Edge payment processing.
- thirdweb Nebula - AI agent transaction framework.
Tools & Services
- CrossFin โ x402 Agent Services Gateway with 15 paid Korean market data APIs (Kimchi Premium, KOSPI, Bithumb, Upbit, Coinone, FX, headlines, trading signals). First financial data APIs in the x402 ecosystem. MCP server included.
- x402 API Network - 16 micropayment-powered APIs for AI agents: email verification, domain health, web scraping, AI content generation (Llama 3.3 70B), DNS, WHOIS, SSL check, and more. Includes MCP server, Bazaar discovery, and .well-known/x402 manifest. (GitHub)
- dTelecom STT - Real-time speech-to-text API with dual-engine architecture (Parakeet-TDT + Whisper), 99+ languages, hallucination filtering, $0.005/min. Built on dTelecom DePIN. Python SDK | TypeScript SDK
- BlockRun - AI Gateway + Service Directory with 600+ x402 services indexed, trust scores, and 31+ AI models via pay-per-use USDC.
- Apexti Toolbelt - 1,500+ Web3 APIs via x402 MCP servers.
- Zyte.com - Web scraping with x402 payments.
- BuffetPay - Smart x402 payments with guardrails.
- Cal.com - Automated scheduling with payments.
- AgentStore - Open-source marketplace for Claude Code plugins with x402 USDC payments, 80/20 publisher revenue split, and permissionless publishing via CLI.
- AIAgentStore.ai - Insights for founders with x402 payments.
- Einstein AI - AI blockchain intelligence with 23 x402 endpoints. Whale tracking, smart money, launchpad monitoring, security audits.
- Apollo Intelligence Network - 27 x402 endpoints for AI agents: intelligence feeds (pain points, agentic trends, sentiment), crypto prices, OSINT (IP/domain intel), DeFi yields, real-time X/Twitter search, proxy infrastructure, and bundles. MCP server with 26 tools. USDC on Base. (GitHub) | (npm)
- Moltalyzer - Three AI intelligence feeds for agents: hourly Moltbook community digests, daily GitHub trending repos, and daily Polymarket insider detection via x402 micropayments on Base.
- OpSpawn Screenshot API - Pay-per-request screenshot and document generation API with x402 micropayments. $0.01/screenshot, $0.005/markdown conversion. USDC on Base.
DeFi & Finance
- Cred Protocol - Decentralized credit scoring.
- Chainlink VRF - Random NFT minting with payment demo.
- Signet - Onchain spotlight ads on Base โ AI agents pay USDC via x402 to post ads. First mainnet x402 transaction on Base. CLI
Developer Tools
- NEAR AI - Cross-chain agent settlements.
- Boosty Labs - AI agents buying real-time insights.
๐ Ecosystem Market Data
Live metrics and on-chain analytics for the x402 ecosystem.
Market Overview
Ecosystem Market Cap: $815 million combined market capitalization of x402 ecosystem tokens. Weekly Transactions: 500K+ payment settlements across all chains. Cumulative Transactions: 10.5M+ total transactions processed on AIsa network. Transaction Growth: 10,000%+ year-over-year increase in payment volume. Settlement Time: 2-second average across production deployments.
Analytics Dashboards
- Dune Analytics x402 - Comprehensive on-chain metrics and visualizations including real-time transaction volumes, chain-by-chain analytics, facilitator comparison data, and revenue/fee metrics.
- x402scan Explorer - Blockchain explorer for x402 payments with transaction search and verification, payment requirement inspection, and settlement status tracking.
- CoinGecko x402 Category - Token tracking and market data featuring $180M+ tracked market cap, price charts, trading volumes, and ecosystem token listings.
Growth Metrics
Evolution from developer curiosity to production scale: Q1 2024 (Initial protocol launch), Q2 2024 (Major tech company integrations including Coinbase and Cloudflare), Q3 2024 (AIsa crosses 5M transactions milestone), Q4 2024 (10,000%+ growth with $815M ecosystem valuation), 2025 (Google A2A protocol and Visa enterprise exploration).
Network Statistics
| Metric | Value | Source |
|---|---|---|
| Total Transactions | 10.5M+ | AIsa Network |
| Weekly Volume | 500K+ | Ecosystem-wide |
| Market Cap | $815M | Benzinga, CoinGecko |
| Settlement Speed | 2 seconds | Production avg |
| Supported Chains | 5+ | Base, ETH, SOL, BNB |
| Active Facilitators | 10+ | Hosted + Self-hosted |
๐ Migration Guides
Comprehensive guides for migrating from traditional payment systems to x402.
From Traditional Payment Processors
- From Stripe to x402 - Migrate subscription and one-time payments from Stripe to x402 for crypto-native payments with instant settlement.
From Authentication to Payments
- From API Keys to x402 Payments - Replace API key-based access control with payment-per-use models.
From Subscription to Usage-Based
- From Subscription to Pay-Per-Use - Transform monthly subscriptions into granular pay-as-you-go pricing.
๐ Security & Audits
Security resources and best practices for x402 implementations.
Smart Contract Audits
- Coinbase x402 Security Audit - Official security audit of x402 protocol smart contracts.
- Circle USDC Audits - Comprehensive audits of USDC contracts used in x402 settlements.
- EIP-3009 Security Analysis - Security considerations for TransferWithAuthorization.
Security Best Practices
x402 Security Checklist - Production deployment security requirements.
- Signature verification best practices
- Replay attack prevention
- Nonce management strategies
- Rate limiting and DDoS protection
Payment Verification Guide - Proper payment verification implementation.
- Facilitator trust models
- On-chain verification fallbacks
- Amount and recipient validation
Key Management - Secure private key handling for automated payments.
- Hardware wallet integration
- Key rotation strategies
- Multi-signature setups for high-value
Known Vulnerabilities & Mitigations
- CVE Database - Known vulnerabilities and patches.
- Replay Attack Prevention - Nonce and deadline handling.
- Front-Running Mitigation - MEV protection strategies.
Bug Bounty Programs
- Coinbase Bug Bounty - Report x402 vulnerabilities for rewards up to $50,000.
- Immunefi x402 Program - Decentralized bug bounty platform.
Security Monitoring
- Rate Limiting Tools - Prevent abuse and ensure service availability.
- PaySentry - Control plane for AI agent payments. Spending limits, circuit breakers, anomaly detection, and audit trails for x402 integrations. npm:
@paysentry/x402.
Spending Controls & Policy Enforcement
- PolicyLayer - Non-custodial spending controls for AI agents with crypto wallets. As AI agents increasingly need to make on-chain payments (buying APIs, paying for services, executing trades), they need financial guardrails. PolicyLayer enforces daily spending limits, per-transaction caps, recipient whitelists, and rate limiting โ all without holding private keys. Prevents wallet drains from bugs, prompt injection attacks, or infinite loops. GitHub | npm
๐ Related Protocols
Adjacent protocols and standards.
Payment Protocols
- Lightning Network - Bitcoin Layer 2 micropayments.
- Stellar Anchors - Cross-border payments.
- Request Network - Payment request protocol.
Web Standards
- HTTP Status Codes - Complete reference.
- EIP-3009 - TransferWithAuthorization.
- ERC-20 - Token standard.
AI & Agent Protocols
- Model Context Protocol (MCP) - Anthropic's context standard.
- Agent Protocol (AP2) - Agent communication standard.
- OpenAI Function Calling - Tool use API.
Historical Reference
- 21.co Micropayments - Early Bitcoin micropayment attempt (2015).
- HTTP 402 Proposal - Original RFC (1999).
๐ค Contributing
Contributions welcome! Please read the contribution guidelines first.
How to Contribute
- Search existing resources to avoid duplicates
- Make an individual pull request for each suggestion
- Use the following format:
[Resource Name](link) - Description. - New categories or improvements to the existing structure are welcome
- Check your spelling and grammar
- Ensure your text editor removes trailing whitespace
What to Contribute
โ Encouraged:
- New implementations in different languages
- Production use cases and case studies
- Tutorials and educational content
- Tools and utilities that extend x402
- Integration examples with popular frameworks
- Documentation improvements
โ Please Avoid:
- Spam or promotional links
- Duplicate resources
- Incomplete or broken projects
- Resources not directly related to x402
Pull Request Guidelines
- Title: Use format
Add [Resource Name]orUpdate [Section] - Description: Briefly explain what you're adding and why it's useful
- Testing: Ensure any code examples work as expected
- Links: Verify all links are accessible and correct
Issue Guidelines
- Use issue templates when available
- Search existing issues before creating new ones
- Provide context and examples for bug reports
- Be respectful and constructive
Awesome Lists
Looking for more awesome lists?
- sindresorhus/awesome - The awesome list of awesome lists.
- Awesome Blockchain - Blockchain resources.
- Awesome Web3 - Web3 development.
- Awesome Ethereum - Ethereum development.
- Awesome Crypto - Cryptography resources.
๐ Built with โค๏ธ by xPay Helping the agentic community get paid and pay safely! If this helped you become an x402 champion, please โญ star the repo and share it! Official x402 Website โข Protocol Repo โข Documentation โข Discord โข Twitter