Every lender, fintech and bookkeeping team that works with bank statements hits the same wall. Banks publish PDFs, not data. Each bank prints its own layout, changes it without notice, and keeps several versions in use at once. A generic extractor reads most rows correctly, and the rows it gets wrong look exactly like the ones it got right.
That is the real problem. A deposit read as a withdrawal, a wrapped narration that swallows an amount, a page footer read as a transaction: none of these throws an error. They surface weeks later as a wrong credit decision, a ledger that won’t close, or an analyst re-keying a statement by hand.
We build parsers that check their own output against figures the bank already printed, and refuse to pass a statement that doesn’t tie out.
Who this is for
- Lenders and credit teams reading statements to underwrite: income, obligations, bounced payments.
- Fintechs that need a statement extraction API behind their own product.
- Bookkeeping outsourcers and accounting firms turning client statements into ledger entries at volume.
How we build it
We built and run this for our own product. Lekhavo takes Indian chartered-accountant practices from bank statements to closed books, and its statement parser is a separate service that other applications call too. The full story is in the bank statement parser case study. The same method shapes client work.
One parser per layout, picked automatically
Each bank layout gets its own parser. When a file arrives, every registered parser scores how well it matches, and the highest score wins, with a fixed tie-break so the same file always goes to the same parser. A file no parser recognizes is rejected as unsupported instead of being forced through the closest match.
Geometry, not guesswork
For PDFs we read words with their positions on the page and assign them to columns by x-coordinate. Right-aligned amounts are clustered by their right edges. A number only counts as an amount if it lines up with an amount column; otherwise it stays in the narration, which keeps stray digits from payment reference strings out of your totals.
The bank’s own figures are the test
A correctly parsed statement balances: each row’s running balance equals the previous balance plus that row’s amount, and the opening balance plus every transaction equals the closing balance. We check both, for every statement, on every parse. Where a bank prints a summary block with debit and credit totals or counts, the parser reads those too and compares the rows against them.
When a layout leaves something ambiguous, such as a sparse withdrawal column, the parser may infer the direction of each amount from the running balance. In our parser that correction is applied only when the inferred rows reproduce the printed opening, closing, totals and counts exactly. Otherwise the statement is left unbalanced so the check catches it, rather than being quietly rewritten.
Failures are held, not hidden
A statement that doesn’t tie is stopped before its transactions are committed. The record keeps the gap to the paisa (or cent), the parser and its version, and the reason. A reviewer accepts it, rejects it or sends it back for a reparse once the parser is fixed. The guide to validating bank statement extraction covers these checks in detail, and you can use it even if you never hire us.
Duplicates without data loss
Overlapping statements and re-uploads are normal. We fingerprint each transaction by account, date, amount and normalized description, plus its position among identical rows, so a second copy of a statement adds nothing while two genuine identical payments on the same day both survive.
How the work is run
We build with an AI software factory: many agents working in parallel, held to fixed gates. Each change starts from a written spec, gets its failing tests before its code, goes through independent reviews, and ships only after a human signs off. For a parser, the tests are real statements from your sample set, re-parsed on every change and held to the balance checks above. A new layout is done when its fixtures reconcile, not when a few rows look right.
What you get
- Parsers for the banks and layouts in your sample set, as a library or behind an HTTP API.
- A typed output schema: statement metadata (bank, account, period, opening and closing balance) and transactions with the running balance after each row.
- Balance and total checks on every parse, with held statements and a review flow.
- For an API: asynchronous jobs, idempotent submission, signed webhooks, and each parse run in its own process under a hard time limit.
- A regression suite built from your own statements, so a layout change at the bank shows up as a failing test.
- Deployment on your infrastructure or ours, with the documentation your team needs to add the next layout.
If balances tie out, the data downstream can be trusted. If they don’t, you find out at import, not at month-end. If statements are a bottleneck for your team, tell us about your banks and volumes.
