ZenithPay iconZenithPay

Introduction

Welcome

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

ZenithPay banner

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

  1. Agent Wallet
    • Privy-managed wallet, no raw private key handling in app code.
  2. Policy Engine
    • SpendPolicy.sol enforces per-tx and daily constraints on Base.
  3. Payment Engine
    • POST /pay orchestrates check -> x402 settlement.
  4. Seller Route
    • /sell/agent-intel implements x402 seller flow (402 challenge, verify, settle, paid response).
  5. Control Plane
    • approvals queue, ledger, and MCP tools for operational control.

Payment lifecycle (high level)

  1. Agent submits POST /pay with serviceUrl, maxAmount, and intent.
  2. ZenithPay checks SpendPolicy first.
  3. ZenithPay executes x402 verify/settle on Base.
  4. ZenithPay writes ledger and returns approved, pending, or blocked.

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"
  }'

On this page