# x402 Wallet Ledger & Accounting Report

> x402 Wallet Ledger & Accounting Report is a paid API for AI agents from x402-endpoints.onrender.com, paid per call via x402, $0.04/call, status unknown (last checked 2026-10-16).

Returns structured USDC accounting for any Base wallet — revenue vs expenses, net position, transaction count, top counterparties, and weekly breakdown over a configurable time window

## Facts

- Endpoint: GET https://x402-endpoints.onrender.com/agent/ledger?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-wallet-ledger-accounting-report-72d62718
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ds-0zC_JesC2bJVxkm5UW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-wallet-ledger-accounting-report-72d62718
```

Example prompt: Can you pull a 30-day bookkeeping report for my Base wallet 0xAbC1234567890abcdef1234567890abcdef123456 — I want to see revenue vs expenses, net, and who my top paying counterparties are?

## When to prefer this

Choose this endpoint when you need a structured, human-readable accounting summary — revenue vs expenses, net, counterparty rankings, weekly cadence — for a single Base wallet address, without having to parse raw transaction data yourself. Prefer it over raw blockchain RPC calls or block explorers when the goal is bookkeeping or financial reporting rather than low-level transaction inspection.

## Known failure modes

- Invalid or malformed wallet address (not matching ^0x[a-fA-F0-9]{40}$) returns a validation error
- Wallet has no on-chain USDC activity on Base returns empty or zero-value report
- Unrecognized period value returns an error or falls back to default 30d
- Payment not included or insufficient USDC payment returns 402 Payment Required
- Render cold start may cause occasional slow response or timeout

## How this service works

Your AI agent's books in one call: structured USDC accounting for any wallet on Base (the x402 settlement asset) — revenue (incoming) vs expenses (outgoing), net, transaction count, top paying counterparties and payees, and a weekly breakdown over a 7d/30d/90d window. Turnkey bookkeeping / expense and revenue report an agent can drop straight into its accounting. The value is the structuring, not raw data access.

## Output

A structured JSON object containing: total incoming USDC (revenue), total outgoing USDC (expenses), net balance, transaction count, ranked list of top paying counterparties, ranked list of top payees, and a week-by-week breakdown — all scoped to the requested wallet and time window (7d, 30d, 90d, or all-time).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "wallet"
     ],
     "properties": {
      "period": {
       "type": "string",
       "description": "Reporting window: 7d | 30d | 90d | all (default 30d)"
      },
      "wallet": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "EVM wallet address (0x + 40 hex) to report on"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "notes": [
   "Revenue = incoming USDC (x402 settlements received); expenses = outgoing USDC.",
   "Ledger reflects USDC transfers on Base only; not every USDC transfer is an x402 payment."
  ],
  "query": {
   "period": "30d",
   "wallet": "0x1D1B81247C407521E2A01F3E21514870dcf1620f"
  },
  "cached": false,
  "source": "Base Blockscout USDC transfers (base.blockscout.com), settlement asset for x402",
  "summary": {
   "currency": "USDC",
   "net_usdc": 17.32,
   "tx_count": 221,
   "revenue_usdc": 19.42,
   "expenses_usdc": 2.1,
   "last_activity": "2026-07-01T18:30:00Z",
   "unique_payees": 3,
   "unique_payers": 47,
   "first_activity": "2026-06-02T09:00:00Z",
   "avg_expense_usdc": 0.26,
   "avg_revenue_usdc": 0.09,
   "expense_tx_count": 8,
   "revenue_tx_count": 213,
   "largest_expense_usdc": 1,
   "largest_revenue_usdc": 0.5
  },
  "timestamp": "2026-07-02T12:00:00Z",
  "disclaimer": "Automated bookkeeping of on-chain USDC activity on Base; informational, not accounting/tax advice. Reconcile against your own records.",
  "top_payees": [
   {
    "address": "0xdef...222",
    "tx_count": 4,
    "volume_usdc": 1.5
   }
  ],
  "top_payers": [
   {
    "address": "0xabc...111",
    "tx_count": 40,
    "volume_usdc": 3.2
   }
  ],
  "data_freshness": {
   "as_of": "2026-07-01T18:30:00Z",
   "sources": [
    "Base Blockscout USDC transfers"
   ],
   "row_count": 221,
   "age_seconds": 51300,
   "period_days": 30,
   "retrieved_at": "2026-07-02T12:00:00Z",
   "deterministic": true
  },
  "weekly_breakdown": [
   {
    "week": "2026-W27",
    "net_usdc": 4.8,
    "tx_count": 55,
    "revenue_usdc": 5.1,
    "expenses_usdc": 0.3
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-wallet-ledger-accounting-report-72d62718/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-endpoints.onrender.com](https://www.zero.xyz/host/x402-endpoints.onrender.com/llms.txt)
