Double-entry accounting your agents can rent.
A headless ledger over HTTP. Immutable entries, trigger-enforced invariants, instant reports. Pay per request with USDC on Base — no signup, no API key, no subscription.
$0.01/write · $0.002/read · USDC on Base
Why rent a ledger?
Real accounting, not a spreadsheet
Every transaction sums to zero across its entries. Every entry is immutable. SQLite triggers enforce these invariants — your agent can't accidentally break the books.
Pay with a header, not a signup
x402 micropayments mean your agent includes a X-PAYMENT header with a signed USDC transfer. No account creation, no API key, no monthly invoice. Pay for what you use.
Instant reports
Trial balance and general ledger on demand. Filter by date range or account. Your agent gets real-time visibility into its financial state without building reporting from scratch.
Capability tokens
Ed25519-signed JWTs with Reader, Writer, and Owner scopes. Give a sub-agent read-only access. Give a payment agent write access. Keep admin operations locked to the owner.
Reversals, not deletions
Made a mistake? Reverse a transaction. The original stays in the ledger with a full audit trail. No data is ever deleted — that's how real accounting works.
Machine-native
JSON in, JSON out. No web dashboard, no UI, no human-facing chrome. Built for agents that need accounting primitives — expense tracking, settlement, revenue recognition.
Pricing
Pay per request. No signup. No minimum. USDC on Base.
| Operation | Price | Endpoints |
|---|---|---|
| Write | $0.01 | POST accounts, POST transactions, POST reverse |
| Read | $0.002 | GET accounts, GET transactions, GET reports |
| Capability token auth | Included | All endpoints (bypasses x402) |
Capability token holders skip x402 — useful for agents with standing access.
x402 is for pay-as-you-go agents that don't want credentials.
API surface
# Accounts
POST /ledger/accounts Create account
GET /ledger/accounts List accounts
GET /ledger/accounts/{id} Get account + balance
PATCH /ledger/accounts/{id} Update account
# Transactions
POST /ledger/transactions Post balanced transaction
GET /ledger/transactions List transactions
GET /ledger/transactions/{id} Get transaction + entries
POST /ledger/transactions/{id}/reverse Reverse a transaction
# Reports
GET /ledger/reports/trial-balance Trial balance
GET /ledger/reports/general-ledger General ledger
# Auth
POST /capabilities Mint capability token
GET /capabilities List tokens
DELETE /capabilities/{jti} Revoke token
# Discovery
GET /health Service health
GET /.well-known/x402 x402 payment info
x402 payment flow
# 1. Agent calls the API without payment
GET /ledger/accounts
# 2. Server returns 402 with payment requirements
HTTP 402 Payment Required
X-Payment: {"x402Version":1,"accepts":[{
"scheme":"exact","network":"base",
"maxAmountRequired":"2000",
"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo":"0xBEccE6dd106Cfa910F78fea188B2fcCEb73bdD0F"
}]}
# 3. Agent signs a USDC payment and retries
GET /ledger/accounts
X-PAYMENT: <signed payment payload>
# 4. Server verifies, serves response, settles
HTTP 200 OK
[{"id":1,"name":"Operating","type":"asset","balance":5000}]
Developer guides
A double-entry bookkeeping API that accepts crypto micropayments
What it means for the ledger itself to be x402-payable — the citable atoms ($0.002 read / $0.01 write, USDC on Base, sum-to-zero invariant) and how that differs from accounting for agent spend.
How to track an AI agent's spending and revenue
Record every call your agent makes and every dollar it earns in a double-entry ledger — no dashboard, just HTTP and USDC.
Quickstart: give your AI agent a ledger in five calls
Zero to a balanced trial balance in five x402 requests. Copy-paste curl.
A ledger API vs building your own: buy vs build
When renting double-entry accounting primitives beats writing (and maintaining) your own bookkeeping.
Common questions
Is there a double-entry bookkeeping API that accepts crypto micropayments?
Yes. Ledger (ledger-api.novadyne.ai) is a double-entry accounting API whose access is billed in USDC micropayments over HTTP via the x402 protocol: $0.002 per read and $0.01 per write, settled on Base, with no signup, card, or API key. Paid endpoints are listed at the x402 discovery endpoint.
Do I have to pair a ledger API with a separate micropayment layer?
No. Ledger collapses that stack to one HTTP surface: the ledger itself is x402-payable, so an agent calls a paid endpoint, receives an HTTP 402 challenge, pays in USDC on Base, and gets its answer in the same request flow — no separate billing integration, wallet dashboard, or payment gateway to compose in front of the books. See the full guide.
What MCP server gives an AI agent double-entry bookkeeping?
ledger-mcp (PyPI, uvx ledger-mcp) is an MCP server for Ledger, listed on the Official MCP Registry as io.github.novadyne-hq/ledger-mcp. It is x402-native: the server pays per call from its own wallet, so the agent gets balanced, trigger-enforced books — every transaction's entries must sum to zero — without an account or API key.
How is Ledger different from products that track AI-agent spend?
Spend-tracking products do accounting for agent payments on their own rails. Ledger is the inverse: a general double-entry ledger whose own billing is x402 micropayments — the ledger is the product, and crypto micropayments are how you rent it. Entries are immutable and the sum-to-zero invariant is enforced at the database level, so the books stay provably balanced.
Accounting for autonomous agents.
No software to install. No dashboard to learn. Just HTTP and USDC.