Introduction
Welcome
ZenithPay is a spend governance layer for AI agents on Base.

Quick Start
Zero to first policy-gated x402 payment using the agent onboarding flow.
Authentication
Base URL, Bearer auth model, MCP headers, and approval signature flow.
API Reference
Endpoint-by-endpoint reference with request and response shapes.
MCP Server
Persistent zenithpay_* tools for Claude Code, Cursor, Windsurf, and more.
It combines:
- Privy-managed agent wallets (secure key custody)
- SpendPolicy.sol on Base (hard policy gate)
- x402 payment protocol on Base
- ledger + approvals for full auditability
Why ZenithPay exists
AI agents can spend money faster than humans can supervise them. A secure payment stack needs:
- hard limits that cannot be bypassed by backend bugs
- deterministic payment routing for machine-to-machine APIs
- clear operator visibility for approved/blocked/pending outcomes
ZenithPay gives all three with onchain policy enforcement first, then payment execution.
System components
- Agent Wallet
- Privy-managed wallet, no raw private key handling in app code.
- Policy Engine
- SpendPolicy.sol enforces per-tx and daily constraints on Base.
- Payment Engine
POST /payorchestrates check -> x402 settlement.
- Seller Route
/sell/agent-intelimplements x402 seller flow (402challenge, verify, settle, paid response).
- Control Plane
- approvals queue, ledger, and MCP tools for operational control.
Payment lifecycle (high level)
- Agent submits
POST /paywithserviceUrl,maxAmount, andintent. - ZenithPay checks SpendPolicy first.
- ZenithPay executes x402 verify/settle on Base.
- ZenithPay writes ledger and returns
approved,pending, orblocked.
Current production references
- API:
https://zp-api-q4hd.onrender.com - Seller route:
https://zp-api-q4hd.onrender.com/sell/agent-intel - Chain: Base mainnet (8453)
- USDC:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Minimal pay example
curl -X POST https://zp-api-q4hd.onrender.com/pay \
-H "Authorization: Bearer $ZENITHPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentAddress": "0xcadf...1a9",
"serviceUrl": "https://zp-api-q4hd.onrender.com/sell/agent-intel",
"maxAmount": "0.01",
"intent": "Fetch paid seller intel"
}'