x402 Protocol Reference
HTTP 402 Payment Flow
Standard Payment Flow
GET /abc123HTTP/1.1 402 Payment Required Content-Type: application/json { "x402": { "token": "payment_token_here", "amount": "0.01", "address": "0x742d35Cc6634C0532925a3b8c2414F4e456C10F4" } }GET /abc123 X-Payment: <base64-encoded-payment-data>
Authentication + Payment Flow
x402 Headers
Request Headers
Response Headers
Payment Data Structure
EVM Payment Structure
Solana Payment Structure
EVM Field Descriptions
Field
Description
Solana Field Descriptions
Field
Description
EIP-712 Typed Data Signature
Network Configurations
EVM Networks
Solana Networks
JavaScript Implementation Example
Error Handling
Client Libraries
Last updated