ledgerby Novadyne
Ledger › Guides

Guides

Practical guides for developers and AI agents using Ledger — a headless double-entry accounting API that agents rent over HTTP with x402 micropayments (USDC on Base, no signup, no API key). Every guide ships runnable examples against the live API.

What is x402? Pay-per-call APIs for AI agents, explained

x402 lets a service charge for an HTTP request with no signup or API key: the server answers 402 Payment Required, the client pays in stablecoin, and retries. Here is how it works and why it fits autonomous agents.

Double-entry accounting for AI agents

An autonomous agent that earns and spends money needs more than a running total. Double-entry accounting gives it self-checking, auditable books. Here is the model in agent terms, with the five account types and the sum-to-zero invariant.

Quickstart: give your AI agent a ledger in five calls

A copy-paste walkthrough: create two accounts, post a balanced transaction, and pull a trial balance against the live Ledger API — paying per request with x402, or with a capability token.

How to track an AI agent's spending and revenue

A worked example: model an agent that earns fees and pays for tools as double-entry accounts, record each event as a transaction, and read its profit with a trial balance — all over HTTP.

Capability tokens vs x402: which auth model for your agent?

Ledger supports two auth models — pay-as-you-go x402 micropayments and standing Ed25519 capability tokens with Reader/Writer/Owner scopes. Here's an honest comparison and when to use each.

A ledger API vs building your own bookkeeping: buy vs build

Should you rent a double-entry ledger API or build accounting into your agent yourself? An honest look at what you'd have to build, when DIY makes sense, and when renting wins.