P402 Router is a payment infrastructure solution designed specifically for the x402 protocol, which enables HTTP 402 payment-required responses for API monetization. It sits between paid endpoints and payment facilitators to provide a comprehensive routing and control layer.
Key Features
- Smart Routing: Automatically selects the best payment facilitator based on health, cost, and policy requirements with failover capabilities
- Spend Controls: Enforces per-buyer budgets, route caps, rate limits, and deny rules with stable error codes
- Decision Tracing: Records complete traces for every payment attempt from 402 challenge to settlement
- Bazaar Integration: Publishes machine-readable metadata for endpoint discovery with real-time health signals
- Protocol Compliance: Fully compatible with x402 v2 headers including PAYMENT-REQUIRED, PAYMENT-SIGNATURE, and PAYMENT-RESPONSE
- Settlement Infrastructure: Handles USDC/USDT payments on Base blockchain with EIP-3009 compliance
Use Cases
- Pay-per-call APIs: Meter individual API requests without requiring subscriptions
- MCP Servers: Charge per tool invocation in agent frameworks
- Agent-to-Agent Payments: Enable autonomous payment flows between AI agents
- Internal Chargeback: Implement paid edges between internal services across teams
- Self-Healing Data Pipelines: Automatically upgrade from rate-limited (429) to paid (402) endpoints
Technical Implementation
The router evaluates request context, selects appropriate payment options, routes verification and settlement through facilitators, and maintains complete observability with metrics like p95 verify/settle latency and approval rates. It supports role-based access, key rotation, audit logs, and provides SDKs for easy integration.

