If you have ever generated bank files for QuickBooks, you have probably met the duplicate problem. A user imports a .qbo file, something looks off, they fix it and import again, and now every transaction appears twice. Or they import January, then a merged January–March file, and January doubles.
QuickBooks Web Connect files are OFX under the hood, and OFX already has a mechanism for this: every transaction carries a FITID, the Financial Institution Transaction ID. When the importer sees a FITID it has already seen for that account, it can treat the row as a duplicate instead of a new transaction. The mechanism only works if the generator gives the same transaction the same FITID every time.
Random IDs break re-imports
The tempting implementation is a UUID per row. It is unique, which looks like the requirement. But it is unique per export, not per transaction. Export the same statement twice and you get two different sets of IDs, so the importer has no way to know the second file describes the same money.
What you want is an ID that is a pure function of the transaction itself. BalanceTab, a browser-based converter for PDF bank statements, describes its approach on its PDF-to-QuickBooks notes: every transaction in the .qbo export gets a deterministic FITID based on posting date and sequence, so QuickBooks can detect duplicates if a file is uploaded twice.
Here is the idea as a minimal illustration (this is my sketch of the concept, not BalanceTab's source):
// Illustration only: derive a stable FITID from what identifies the row. function fitidFor(postedDate, sequenceOnThatDate) { const d = postedDate.replaceAll("-", ""); // 2026-01-15 -> 20260115 return `${d}-${String(sequenceOnThatDate).padStart(4, "0")}`; } // Two exports of the same statement produce identical IDs: fitidFor("2026-01-15", 1); // "20260115-0001" fitidFor("2026-01-15", 1); // "20260115-0001" The sequence matters because two genuine transactions can share a date and even an amount: two identical coffee purchases on the same day are not duplicates. Date alone would collapse them; date plus position keeps them distinct while staying stable across exports.
Signs are part of the contract
OFX amounts are signed. Deposits and credits are positive; checks, ACH debits and fees are negative. Bank PDFs rarely print it that way. Some use separate debit and credit columns, some use a trailing "CR", some print every amount as positive and rely on the column. BalanceTab says it normalises this deterministically on export: credits positive, debits negative, in standard OFX/QBO form. Getting this wrong does not produce an error message. It produces a ledger where a refund looks like a charge.
A checksum before you write the file
A stable ID protects against importing the same row twice. It does nothing about a row that was never extracted. PDF parsing fails quietly: a multi-line description becomes two rows, or a row at a page break disappears.
Bank statements come with their own checksum, though. They print an opening balance and a closing balance, so the extracted rows have to satisfy:
opening + sum(credits) - sum(debits) == closing BalanceTab runs exactly this check before it lets you download a .qbo file and shows the result as a "Balanced ($0.00 diff)" status. If a line is off, that row is flagged. In code terms, it is an assertion you run before serialising, and it catches missing rows, duplicated rows and flipped signs in one comparison. Compare in integer cents rather than floats, or you will chase a 0.000000001 difference that is not real.
Merging months without breaking either property
Catch-up work usually means many statements. BalanceTab accepts up to 50 digital PDF statements in one batch, verifies each month's balance math separately, and merges them chronologically into one .qbo or Excel file. The order of operations is the useful pattern: verify each statement on its own first, because each one has its own opening and closing balance, and only then concatenate. A checksum across the merged file would hide which month was wrong.
Small things that still matter
- Payee names. Bank memos are often wrapped across several lines. BalanceTab collapses them into readable payee names within QuickBooks character limits, so the bank feed rules on the QuickBooks side have something sensible to match.
- Import paths. In QuickBooks Online the file goes in through Transactions → Bank transactions → Link account → Upload from file. In QuickBooks Desktop it is File → Utilities → Import → Web Connect Files.
- Where the parsing happens. BalanceTab parses statements in the browser; its privacy page says files are not uploaded to its servers or retained after export. For financial documents, that is a design decision worth making early, because it shapes everything else in the pipeline.
- Scans are out of scope. It supports native digital PDFs from online banking, not image-only scans. A scan needs OCR first, and the balance check is the right thing to run after that step.
The two ideas combine well. A deterministic FITID makes the import idempotent, and the balance checksum makes the content trustworthy. Neither is complicated, and together they remove most of the ways an exported bank file can quietly corrupt someone's books.
