402.md Documentation
Payment infrastructure for the agentic web
For Sellers
Embed a checkout widget or install server-side middleware to accept USDC payments.
- @402md/checkout — Drop-in "Pay with USDC" button for any website
- @402md/gateway — Express middleware that returns HTTP 402 for unpaid requests
- Creating Skills — Register your API, set prices, and get paid in USDC
For Agents
Give your AI agent a USDC wallet. Discover, pay for, and use any 402.md service programmatically.
- @402md/client — TypeScript SDK for calling paid APIs, subscribing, and purchasing
- @402md/mcp — MCP tools for Claude, GPT, and other AI assistants
- x402 Wallet — Desktop app with embedded MCP server for Claude integration
Skill Types
Every service on 402.md is a skill. Skills come in six types:
| Type | Description | Example |
|---|---|---|
| API | Pay-per-call endpoint | Sentiment analysis API |
| SaaS | Subscription access for N days | Analytics dashboard |
| Product | Physical or digital good | Hardware widget |
| Service | One-time delivery | Logo design |
| Subscription | Recurring access | Monthly data feed |
| Content | Unlock gated content | Premium article |
Authentication
402.md supports four authentication methods depending on the context:
| Method | Used by | Context |
|---|---|---|
| JWT ticket | Agents, browsers | Returned after payment, proves access |
| API key | Sellers | Server-side SDK authentication |
X-402-Payment header | Agents | x402 protocol payment proof |
| Publishable key | Browsers | Client-side checkout widget |
Network
All payments use USDC on Base (Coinbase's L2):
- USDC contract:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - Chain ID: 8453
- Block time: ~2 seconds
- Gas fees: < $0.01
- Testnet: Base Sepolia (USDC:
0x036CbD53842c5426634e7929541eC2318f3dCF7e)