# Double Entry Ledger Audit

> Double Entry Ledger Audit is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-10).

Validates journal entries for double-entry bookkeeping correctness, catching imbalanced entries, sign errors, out-of-chart accounts, duplicate references, and closed-period postings using exact decimal arithmetic.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/double-entry-ledger-audit?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/double-entry-ledger-audit-dbbd5699
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5PgYICtvhpwV5iucbo897

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 double-entry-ledger-audit-dbbd5699 -d '<json body>'
```

Example prompt: Audit these journal entries for me — check that debits and credits balance, flag any entries posting to accounts outside our chart of accounts, and reject anything dated before March 31 since that period is closed.

## When to prefer this

Choose this endpoint when you need rigorous, exact-decimal double-entry accounting validation rather than simple sum checks. It is the right choice when your pipeline ingests journal entries from multiple source systems (ERPs, spreadsheets, manual entry) and you need to catch the full taxonomy of bookkeeping errors before posting to a general ledger — especially sign ambiguities like negative debits that defeat standard sum-based checks. It is particularly valuable for month-end close automation, audit preparation, or any workflow where incorrect entries could propagate into financial statements.

## Known failure modes

- Entry lines array is empty or missing — returns validation error
- Account names in entries not found in chart_of_accounts — reported as out-of-chart violations
- Malformed date strings for entry dates or closed_before — may cause parse errors or incorrect period checks
- More than 20,000 entries submitted — request rejected due to maxItems limit
- Debit or credit values not parseable as decimals — may cause arithmetic errors or rejection
- No chart_of_accounts provided — account membership checks are skipped

## How this service works

Check that journal entries balance, with exact decimal arithmetic. Reports an entry whose debits and credits differ, with the exact difference; a line carrying both a debit and a credit, which means two things to two readers; a negative debit, which is a credit written in a form that defeats every sign-based check downstream; a posting to an account outside a supplied chart; a repeated posting reference; and a posting into a period the caller says is closed.

## Output

Returns a structured list of violations found across the submitted journal entries. Each finding identifies the entry ID, the specific line or field at fault, the type of violation (imbalance, sign error, mixed debit/credit line, unknown account, duplicate reference, or closed-period posting), and for balance errors the exact decimal difference between debits and credits.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "entries": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "lines"
    ],
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 128
     },
     "date": {
      "type": "string",
      "maxLength": 32
     },
     "lines": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "account"
       ],
       "properties": {
        "debit": {
         "type": [
          "string",
          "number"
         ]
        },
        "credit": {
         "type": [
          "string",
          "number"
         ]
        },
        "account": {
         "type": "string",
         "maxLength": 128
        },
        "description": {
         "type": "string",
         "maxLength": 512
        }
       },
       "additionalProperties": false
      },
      "maxItems": 500,
      "minItems": 1
     },
     "description": {
      "type": "string",
      "maxLength": 512
     }
    },
    "additionalProperties": false
   },
   "maxItems": 20000,
   "minItems": 1
  },
  "closed_before": {
   "type": "string",
   "maxLength": 32
  },
  "chart_of_accounts": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 128
   },
   "maxItems": 5000,
   "minItems": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/double-entry-ledger-audit-dbbd5699/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
