Skip to content

seanthorne10/awesome-x402

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

GitHub stars

Contents

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 | ⚑ 2-second settlement | πŸ’° USDC on Base


🎯 Quick Start - Become an x402 Champion

New to x402? Follow this path to mastery:

  1. 5-Minute Quickstart - Accept your first payment.
  2. Choose Your Stack - Find your language/framework.
  3. Copy an Example - Working code you can run immediately.
  4. 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.

πŸ“– Protocol Documentation

Essential documentation for understanding and implementing x402.

πŸš€ Quickstart Guides

Get started with x402 in minutes.

βš™οΈ Protocol Implementations

Official and community implementations of the x402 protocol.

Go

  • coinbase/x402 ⭐ Official - Complete Go implementation.
    • Core protocol types and utilities
    • Payment verification and settlement logic
    • Multi-chain support (Base, Base Sepolia, Ethereum, Solana)

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

  • viem - TypeScript library used for signing payments.
  • ethers.js - Alternative Ethereum library.

Rust

  • alloy - High-performance Ethereum library.

πŸ”§ Server Frameworks & Middleware

Server-side integrations for accepting x402 payments.

Node.js/TypeScript

Next.js

Hono

  • Browser wallet example - React + Hono full-stack.

Python

FastAPI

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.
  • 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.
  • MaximumSats MCP - Lightning-native MCP tools with L402 micropayments and Nostr Web-of-Trust scoring APIs.
  • 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)

πŸ”¨ 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

πŸ“š 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

Conference Talks

Tutorial Videos

πŸ“ 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

Use Case Articles

  • The Agentic Economy - How autonomous agents are reshaping commerce, and where x402 fits in.
  • Agentic Commerce - Agent-to-agent transactions, payment rails, and the commerce stack.
  • Agentic Economy Timeline - Key milestones from early agent research to production x402 deployments.
  • 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

Developer Communities

Events & Meetups

  • x402 Hackathons - Upcoming hackathons and prizes.
  • Local Meetups - In-person gatherings.

Newsletters

🌟 Ecosystem Projects

Projects building with or extending x402.

Infrastructure

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.
  • Rug Munch Intelligence - AI-powered crypto risk intelligence with 19 x402 endpoints. Rug pull detection, honeypot scoring, deployer tracking, holder deep-dive, KOL shill detection, social OSINT, and LLM forensic analysis (Claude Sonnet/Opus). $0.02–$2.00 USDC on Base. MCP server (19 tools), A2A agent card, AgentKit plugin. Example Agent | AgentKit
  • 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.
  • Crysha Price Oracle - Aggregated crypto prices (multi-source BTC/others), $0.001/call on Base USDC. Manifest: /.well-known/x402

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 Subscription to Usage-Based

πŸ”’ 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.
  • 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

Bug Bounty Programs

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. Enforces daily spending limits, per-transaction caps, recipient whitelists, and rate limiting without holding private keys.

πŸ”— Related Protocols

Adjacent protocols and standards.

Payment Protocols

Web Standards

AI & Agent Protocols

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

  1. Search existing resources to avoid duplicates
  2. Make an individual pull request for each suggestion
  3. Use the following format: [Resource Name](link) - Description.
  4. New categories or improvements to the existing structure are welcome
  5. Check your spelling and grammar
  6. 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] or Update [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?


πŸš€ Built with ❀️ by xpay✦
Helping the agentic community get paid and pay safely!
If this helped you, please ⭐ star the repo and share it!

Official x402 Website β€’ Protocol Repo β€’ Documentation β€’ Discord β€’ Twitter

About

πŸš€ Curated list of x402 resources: HTTP 402 Payment Required protocol for blockchain payments, crypto micropayments, AI agents, API monetization. Includes SDKs (TypeScript, Python, Rust), examples, facilitators (Coinbase, Cloudflare), MCP integration, tutorials. Accept USDC payments with one line of code. Perfect for AI agent economy.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors