θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
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

olivajoy091/awesome-x402

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

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

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 - $0.01)
  • Content views ($0.01 - $0.10)
  • Data queries ($0.001 - $0.05)

Metered Billing

  • Token-based LLM APIs
  • Time-based service access
  • Usage-based pricing tiers

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

  • Coinbase CDP - Hosted facilitator service.
  • Cloudflare x402 - Edge payment processing.
  • thirdweb Nebula - AI agent transaction framework.

Tools & Services

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

DeFi & Finance

Analytics & Data

  • Dune Analytics x402 - On-chain metrics dashboard.
  • CoinGecko x402 Tokens - Token category ($180M market).

Developer Tools

  • NEAR AI - Cross-chain agent settlements.
  • Boosty Labs - AI agents buying real-time insights.

πŸ”— 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?

Star History

Star History Chart


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