When US small businesses and CPA firms import Web Connect (.QBO) bank statements into QuickBooks Desktop or QuickBooks Online during year-end reconciliation, the two most frustrating failure screens give almost zero diagnostic detail:
- QuickBooks Error OL-222: "QuickBooks was unable to complete your request. Contact your financial institution."
- QuickBooks Error OL-332 / Unverified Institution: "QuickBooks is unable to verify the Financial Institution Information for this download."
Most accounting forums tell bookkeepers to open the .QBO file in Notepad and eyeball hundreds of SGML lines for a stray & or a stale <INTU.BID> tag. As software engineers, we can parse, diagnose, and deterministically repair .QBO files in pure TypeScript right inside the browser (zero bank data uploaded to any server).
This walkthrough explains the exact 7 validation rules behind the browser-local PDFFields .QBO File Validator & Repair Tool and shows the TypeScript patterns for each check.
1. Parsing SGML OFX 1.02 vs. XML OFX 2.x <STMTTRN> Blocks
QuickBooks Web Connect uses OFX 1.02 SGML, where leaf tags usually omit closing tags:
<STMTTRN> <TRNTYPE>DEBIT <DTPOSTED>20261114120000 <TRNAMT>-248.50 <FITID>202611149f41a2c8 <NAME>AT&T *WIRELESS & FIBER </STMTTRN> Notice that some converters emit XML-style closing tags (<NAME>AT&T</NAME>), while traditional bank exports omit them (<NAME>AT&T). A resilient parser extracts each <STMTTRN>...</STMTTRN> block and reads leaf tags cleanly either way:
function extractOfxTag(block: string, tag: string): string | null { const re = new RegExp(`<${tag}>([^<\\r\\n]+)`, 'i'); const match = re.exec(block); return match ? match[1].trim() : null; } 2. The 7 Real QuickBooks .QBO Import Failure Modes
When validating a .QBO file before import, these 7 checks catch nearly every Web Connect rejection or silent corruption bug:
| Check | QuickBooks Symptom | Root Cause in .QBO | Automated Fix |
|---|---|---|---|
| 1. OFX 1.02 Header | File rejected immediately | Missing OFXHEADER:100, DATA:OFXSGML, VERSION:102, or ENCODING:USASCII | Rebuild canonical 9-line OFX 1.02 header |
2. <INTU.BID> Lookup | Error OL-332 / "unable to verify financial institution" | Missing, expired, or bank-branch FID absent from QuickBooks fidir.txt | Map to verified US bank FID (e.g. Wells Fargo 3000 universal fallback, Chase 10898, BofA 5959, Amex 3101, Capital One 1009) |
| 3. SGML Escaping | Error OL-222 | Raw & in payee names (AT&T, BARNES & NOBLE), stray </>, or non-ASCII UTF-8 bytes | Escape unescaped & to &, strip </>, normalize to ASCII/CP1252 |
| 4. Field Lengths | Error OL-222 or truncated payees | <NAME> > 32 characters or <MEMO> > 255 characters | Trim <NAME> to 32 chars and preserve full detail in <MEMO> (<= 255 chars) |
5. <FITID> Uniqueness | Transactions silently skipped | Missing <FITID> or duplicate IDs across rows / multi-month merges | Generate deterministic FNV-1a <FITID> from (date, amount, description, occurrenceIndex) |
| 6. Account Envelope | Credit card forced into Checking register | Credit card statement wrapped in <BANKMSGSRSV1> instead of <CREDITCARDMSGSRSV1> | Rebuild under <CREDITCARDMSGSRSV1> / <CCSTMTRS> / <CCACCTFROM> |
7. Reversed +/- Signs | Credit card purchases import as payments | Card issuers print purchases as positive (+248.50) while QuickBooks expects negative (-248.50) | Invert every <TRNAMT> sign and swap DEBIT / CREDIT cleanly |
3. Detecting Unescaped & (The #1 Cause of Error OL-222)
A common mistake is blindly running .replace(/&/g, '&'), which turns already-valid & into &amp;. Instead, match only unescaped ampersands with a negative lookahead:
const UNESCAPED_AMP_RE = /&(?!amp;|lt;|gt;|quot;|apos;|#\d+;|#x[0-9a-f]+;)/i; export function hasUnescapedSgmlEntity(value: string): boolean { return UNESCAPED_AMP_RE.test(value) || /[<>]/.test(value); } export function sanitizeSgmlText(value: string, maxLen: number): string { return value .replace(/[\r\n\t]+/g, ' ') .replace(/[<>]/g, '') .replace(/&(?!amp;|lt;|gt;|quot;|apos;|#\d+;|#x[0-9a-f]+;)/gi, '&') .replace(/[^\x20-\x7E]/g, '') .trim() .slice(0, maxLen); } 4. Handling Expired <INTU.BID> Codes (Error OL-332)
QuickBooks Desktop ships a static bank directory (fidir.txt). When a regional bank or credit union merges, changes its online banking provider, or stops paying Intuit for Web Connect certification, its INTU.BID stops passing validation.
Switching <INTU.BID> to an active universal US bank code such as 3000 (Wells Fargo) or the matching major US bank preset lets the file pass QuickBooks validation, while you still choose your real Chart of Accounts register during the Bank Feeds mapping screen:
- Wells Fargo (universal fallback):
3000(Wells Fargo PDF to .QBO) - Chase:
10898(Chase PDF to .QBO) - Bank of America:
5959(Bank of America PDF to .QBO) - American Express:
3101(Amex PDF to .QBO) - Capital One:
1009(Capital One PDF to .QBO) - Citibank:
24909(Citibank PDF to .QBO) - PNC Bank:
6209(PNC PDF to .QBO) - U.S. Bank:
6812(U.S. Bank PDF to .QBO)
5. Validate & Repair Any .QBO File Locally in Your Browser
Because bank ledgers contain account numbers, payroll disbursements, and vendor trails, we run the entire validator and repair engine 100% client-side in browser memory with zero server uploads.
Drop any broken .QBO or .OFX file (or test our built-in broken sample file) to inspect every OL-222, OL-332, duplicate FITID, envelope, and sign issue free before exporting a repaired file at pdffields.com/qbo-file-validator, or convert monthly bank statement PDFs directly to .QBO at pdffields.com/pdf-to-qbo.


