x402 is an open, neutral standard for internet-native payment over HTTP. A client requests a resource, receives 402 Payment Required, submits payment, and gains access. Created by Coinbase and contributed to the Linux Foundation, it removes the need for accounts, signups, and API keys in machine commerce.
Key Features
- Native HTTP Flow: Payment requirements travel through standard request and response semantics.
- No Protocol Fees: Users pay only nominal network costs.
- Chain Flexibility: Supports EVM networks and Solana, with extensibility to fiat.
- Payment Schemes: Includes exact, upto, and batch-settlement modes.
- Framework Middleware: Available for Express, FastAPI, Flask, Hono, and Next.js.
- Multiple Transports: Works across HTTP, MCP, and A2A.
Use Cases
Who Should Use This Tool?
- API Providers monetizing individual requests.
- Agent Developers purchasing data, compute, content, or tools.
- Infrastructure Teams seeking a vendor-neutral payment interface.
Problems It Solves
- Account setup: Payment can replace signup and API-key provisioning.
- Micropayment friction: Stablecoin settlement supports small resource purchases.
- Vendor lock-in: An open foundation governs the standard.
Pricing
| Plan | Price | Features |
|---|---|---|
| Protocol | Free | Open standard, middleware, and payment schemes. |
| Settlement | Network fees only | Costs depend on the selected payment rail. |
Advantages & Unique Selling Points
Compared to Competitors:
- Protocol, not platform: Implementers choose wallets, chains, and facilitators.
- HTTP-native interaction: Payment fits existing web infrastructure.
- Broad backing: The foundation includes major payment, cloud, commerce, and blockchain organizations.
What Makes It Stand Out:
- No mandatory accounts or API keys.
- Blockchain-agnostic and extensible design.
- Middleware for popular JavaScript and Python frameworks.
User Reviews
"Using an HTTP status code as the negotiation point makes paid APIs easy for agents to understand." Illustrative backend-developer perspective, editorially composed
"Vendor neutrality matters because our service should not dictate the buyer's wallet stack." Illustrative infrastructure-lead perspective, editorially composed
Getting Started
Quick Start Guide
- Choose middleware: Select the package for your server framework.
- Describe payment: Configure amount, asset, network, and recipient.
- Return 402: Protect the paid route with the payment requirement.
- Verify settlement: Grant access after valid payment evidence.
Integration
Integrates with:
- Express, FastAPI, Flask, Hono, and Next.js
- EVM chains and Solana
- HTTP, MCP, and A2A transports
Frequently Asked Questions
Does x402 charge protocol fees?
No. Only nominal costs from the selected settlement network apply.
Does it require user accounts?
No. The standard is designed to work without signups or API keys.
Is x402 limited to one blockchain?
No. It supports multiple blockchain families and can extend to fiat.
Alternatives
- Stripe Agent Toolkit: Stripe tools and machine-payment capabilities.
- Gate Pay: Multi-chain x402 payment infrastructure.
- Delegare: Mandate-controlled x402 and MPP settlement.
Tips & Best Practices
- Return precise requirements: Clearly specify asset, amount, network, and recipient.
- Make verification idempotent: Safely handle retried requests and payment evidence.
- Use batch settlement thoughtfully: Group payments only when latency permits.
Comments
No comments yet. Be the first to comment!
Related Tools
Stripe Agent Toolkit
docs.stripe.com/agents
Stripe's agent stack: MCP at mcp.stripe.com, installable skills, CLI plugins, token metering, and agentic commerce docs. GitHub repo is stripe/ai.
Delegare
delegare.dev
A secure payment layer for AI agents using signed spending mandates, atomic budget enforcement, and settlement through Stripe or USDC on Base.
caipay
caipay.com
Open-source x402 agent payment infrastructure with independent wallets, gas-free Base transactions, programmable controls, and multichain settlement.
Related Insights

Anthropic Subagent: The Multi-Agent Architecture Revolution
Deep dive into Anthropic multi-agent architecture design. Learn how Subagents break through context window limitations, achieve 90% performance improvements, and real-world applications in Claude Code.
Stop Cramming AI Assistants into Chat Boxes: Clawdbot Picked the Wrong Battlefield
Clawdbot is convenient, but putting it inside Slack or Discord was the wrong design choice from day one. Chat tools are not for operating tasks, and AI isn't for chatting.

Grok Bot and Hermes Bot: one person finally gets a think tank and a secretariat
Grok Bot now ships with Cursor Pro+. Hermes Bot runs on a VPS. They are not smarter chat boxes. The think tank advises, the secretariat executes, and you still make the call.