x402 Protocol Payments
Conto integrates with the x402 protocol to let AI agents pay for HTTP APIs that return402 Payment Required. Conto acts as a policy layer between your agent and the x402 facilitator.
How It Works
- Agent sends a request to an x402-enabled API
- API returns HTTP 402 with payment details (amount, recipient, facilitator)
- Agent calls Conto to pre-authorize the payment against policies
- If approved, agent signs the payment and retries the API call
- Agent records the transaction in Conto for tracking
Pre-Authorization
Before making an x402 payment, check it against your policies:Recording Transactions
After the x402 payment is executed on-chain, record it in Conto:Batch Recording
For high-frequency micropayments, batch multiple records:Querying Services
View which x402 services your agent has used:Budget Tracking
Check remaining budget and burn rate:x402 Policy Rules
Configure x402-specific policies to control micropayment behavior. See Advanced Policies for the full rule type reference. Key rule types:X402_MAX_PER_REQUEST— Cap per individual requestX402_PRICE_CEILING— Hard price ceilingX402_MAX_PER_SERVICE— Budget per service domainX402_ALLOWED_SERVICES— Allowlist of service domainsX402_BLOCKED_SERVICES— Blocklist of service domainsX402_SESSION_BUDGET— Session-level budget cap
Anomaly Detection
Conto automatically monitors x402 spending patterns and creates alerts for:- Price spikes (sudden cost increases)
- High-frequency calls (unusual request rates)
- New services (first-time service usage)
- Budget burn rate (approaching limits)
- Duplicate payments
- Failed streaks (repeated failures)
Next Steps
Advanced Policies
Configure x402-specific policy rules
Error Handling
Handle x402 authorization errors