Skip to content

πŸš€ 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.

License

Notifications You must be signed in to change notification settings

1bcMax/awesome-x402

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 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 Weekly transactions Settlement time

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 | πŸ“ˆ 500K+ transactions/week | πŸ’° $180M+ ecosystem | ⚑ 2-second settlement


🎯 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.

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.

Other Languages

  • x402-go - Go implementation (community-maintained).
  • x402-ruby - Ruby gem (community-maintained).
  • x402-java - Java SDK (community-maintained).
  • x402-php - PHP library (community-maintained).

🏭 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.

Python

Rust

  • alloy - High-performance Ethereum library.

πŸ”§ Server Frameworks & Middleware

Server-side integrations for accepting x402 payments.

Node.js/TypeScript

Next.js

Hono

Python

FastAPI

Rust

Axum

πŸ—οΈ 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.

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

API Examples

Client Examples

🎨 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

πŸ€– 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.

Agent Frameworks

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

Agent Examples

πŸ”¨ Tools & Utilities

Development tools and utilities for x402.

CLI Tools

Browser Extensions

Monitoring & Analytics

Payment Generators

πŸ§ͺ Testing & Development

Tools and resources for testing x402 implementations.

Testnets

Testing Tools

Postman/Insomnia

CI/CD Integration

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

Advanced Tutorials

Code Patterns

πŸŽ₯ 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

News Coverage

πŸ‘₯ Community

Connect with the x402 community.

Official Channels

Developer Communities

Events & Meetups

Newsletters

🌟 Ecosystem Projects

Projects building with or extending x402.

Infrastructure

Tools & Services

DeFi & Finance

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. Includes API comparison, webhook migration strategies, customer migration approaches, and zero-fee cost analysis.
  • From PayPal to x402 - Replace PayPal fees (2.9% + $0.30) with zero-fee x402 settlements. Covers checkout flow conversion, IPN to x402 webhooks, and international payment handling.

From Authentication to Payments

  • From API Keys to x402 Payments - Replace API key-based access control with payment-per-use models. Includes authentication middleware replacement, rate limiting evolution, revenue model transformation, and pay-per-request implementation.
  • From OAuth to x402 - Combine identity with payments for premium API access. Covers SIWE + x402 integration, token-gated + paid content, and dynamic pricing by identity.

From Subscription to Usage-Based

  • From Subscription to Pay-Per-Use - Transform monthly subscriptions into granular pay-as-you-go pricing. Includes SaaS model evolution, pricing psychology and conversion, customer acquisition benefits, and revenue optimization strategies.
  • From Flat Rate to Metered Billing - Implement token-based or time-based usage pricing. Covers LLM API pricing models, infrastructure cost passthrough, and usage tracking and aggregation.

Platform-Specific Migrations

  • WordPress to x402 - Add x402 paywalls to WordPress sites replacing traditional payment plugins.
  • Shopify to x402 - Enable crypto payments for e-commerce with instant settlement.
  • Ghost to x402 - Membership and subscription migration for Ghost publishing platform.

πŸ”’ Security & Audits

Security resources and best practices for x402 implementations.

Smart Contract Audits

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

πŸ”— Related Protocols

Adjacent protocols and standards.

Payment Protocols

Web Standards

AI & Agent Protocols

Historical Reference

🀝 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 become an x402 champion, 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

No packages published