x402

Solid

Build internet-native payments with x402 - HTTP 402 for on-chain micropayments, no accounts or API keys. Use for paid APIs, paywalled content, agent payment flows, or per-call MCP tools. TypeScript, Python, and Go SDKs across EVM and Solana.

AI & Automation 36 stars 1 forks Updated today MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
52
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# x402 Protocol Development x402 is an open standard (Apache-2.0) that activates the HTTP `402 Payment Required` status code for programmatic, on-chain payments. Originally created by Coinbase, now maintained by the [x402 Foundation](https://github.com/x402-foundation/x402). No accounts, sessions, or API keys required - clients pay with signed crypto transactions directly over HTTP. ## When to Use - Building a **paid API** that accepts crypto micropayments - Adding **paywall** to web content or endpoints - Enabling **AI agents** to autonomously pay for resources - Integrating **MCP tools** that require payment - Building **agent-to-agent** (A2A) payment flows - Working with **EVM** (Base, Ethereum, MegaETH, Monad, Polygon, Stable, Arbitrum), **Solana**, **Stellar**, **Aptos**, **NEAR**, or **XRPL** payment settlement - Implementing **usage-based billing** with the `upto` scheme (LLM tokens, bandwidth, compute) - Running an **in-process facilitator** (self-facilitation) without external facilitator dependency ## Core Architecture Three roles in every x402 payment: 1. **Resource Server** - protects endpoints, returns 402 with payment requirements 2. **Client** - signs payment authorization, retries request with payment header 3. **Facilitator** - verifies signatures, settles transactions on-chain Payment flow (HTTP transport): ``` Client -> GET /resource -> Server returns 402 + PAYMENT-REQUIRED header Client -> signs payment -> retries with PAYMENT-SIGNATURE header Serve...

Details

Author
tenequm
Repository
tenequm/skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category