Skip to main content
Introduction to x402
The x402 payment protocol enables instant, onchain payments as part of standard web requests. Built around the HTTP 402 “Payment Required” status code, x402 eliminates the need for redirects, checkout flows, or user accounts, making it ideal for AI agents, autonomous applications, and machine-to-machine transactions.
The protocol is blockchain-agnostic, requires no fees, and provides instant settlement while maintaining security through open standards.
How x402 Works
The x402 protocol follows a simple request-response pattern:
Request : Client makes an HTTP request to an API
402 Response : Server responds with payment instructions
Payment : Client signs payment and resends request with X-Payment
header
Verification : Server or facilitator verifies the payment
Settlement : Payment is submitted to blockchain
Delivery : Server delivers the requested resource
Buyers and Sellers
For Buyers
No accounts required : Pay without creating accounts or providing personal information
Instant payments : Seamless payment experience within HTTP requests
Multiple wallet options : Use embedded wallets, external wallets, or server wallets
Programmatic : Perfect for AI agents and automated applications
For Sellers
Simple integration : Add payment requirements with minimal code changes
Usage-based pricing : Charge per request, per API call, or per resource
No payment processing : Facilitators handle blockchain complexity
Flexible monetization : Enable micropayments and pay-per-use models
Dynamic’s Role
Dynamic’s wallet infrastructure handles the payment signing layer, while x402 provides the payment protocol. This combination offers:
Seamless UX : Embedded wallets sign payments automatically
Multi-wallet support : Works with embedded, external, and server wallets
Developer-friendly : Minimal setup using familiar HTTP patterns
Scalable : Supports both client-side and server-side payment flows
Use Cases
x402 with Dynamic enables powerful new monetization models:
AI billing : Charge per inference or API call for AI services
API monetization : Usage-based pricing instead of subscriptions
Autonomous agents : Agents can pay for services automatically
Micropayments : Pay-per-article, pay-per-video, or pay-per-data-point
Content creators : Instant transactions for premium content
Facilitators
x402 uses facilitators to handle blockchain complexity. The Coinbase Developer Platform provides:
Zero-fee USDC payments on Base
Instant settlement with onchain finality
Built-in compliance and risk screening
Simple integration with minimal setup
Key Benefits
No redirects : Payments happen within HTTP requests
No accounts : Users don’t need to create accounts or log in
Low fees : Especially for micropayments
Instant settlement : Money in your wallet in seconds
Universal compatibility : Works with any HTTP client
Getting Started
Ready to implement x402 payments with Dynamic? Our implementation guide provides detailed code examples and step-by-step instructions for integrating x402 with Dynamic’s wallet infrastructure.