{"uid":"cap_5PgYICtvhpwV5iucbo897","slug":"double-entry-ledger-audit-dbbd5699","name":"Double Entry Ledger Audit","description":"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.","url":"https://api.zfinia.com/x402/v1/double-entry-ledger-audit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Ks_wIuUcDjKhJqjd9xKSp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Month-end close integrity check","prompt":"Before I close out March, run an audit on all 847 journal entries I'm about to post — check they balance to the cent, none post to accounts outside our approved chart, and none are dated before January 1 which is our earliest open period."},{"title":"Detecting sign errors in imported entries","prompt":"I just imported journal entries from our ERP export and I'm worried some debits came through as negative numbers or with both debit and credit filled in on the same line — can you audit them and tell me exactly which lines have sign problems?"},{"title":"Duplicate reference detection before posting","prompt":"We're about to bulk-post 200 journal entries from three different source systems and I need to know if any share the same posting reference ID before they hit the general ledger — can you check for duplicates and flag any that would conflict?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T18:43:14.514Z","isFirstParty":false,"canonicalSlug":"double-entry-ledger-audit-dbbd5699"}