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.
x402 endpoints enforce explicit API-key scopes. Pre-authorization requires
payments:request,
recording execution requires payments:execute, and budget or service analytics require
analytics:read.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 and budget limits:serviceDomain from resourceUrl, so you do not need to send it separately.
Response (Approved):
Recording Transactions
After the x402 payment is executed onchain, record it in Conto:Batch Recording
For high-frequency micropayments, batch multiple records:batchItems; the record endpoint does not accept a top-level payments array.
Querying Services
View which x402 services your agent has used:Budget Tracking
Check remaining budget and burn rate:sessionId is supplied, spend.session also reports the
call count and amount recorded with that customer-defined ID.
Unified Machine Spend View
If this agent also uses MPP or multiple paid services, use the shared machine-spend endpoints for a combined view:x402 Policy Rules
Configure x402-specific policies to control micropayment behavior. The complete list of x402 rule types, value formats, and operators lives in Advanced Policies > x402 Protocol Rules.Anomaly Detection
Conto automatically monitors x402 spending patterns and creates alerts for:
Configure alert thresholds in Alerts in the dashboard.
Next Steps
Advanced Policies
Configure x402-specific policy rules
Machine Spend
View unified x402 and MPP service spend
Error Handling
Handle x402 authorization errors