Skip to main content

Global Bank Statement Accounting Format Reference & CLI Validator

A clean, zero-dependency Python CLI validator and field-level technical specification covering the trickiest global accounting software import formats across 12 tax regions — plus cross-border wallet reconciliation specs (Wise, PayPal, Revolut, Payoneer, Airwallex):

  • QuickBooks Web Connect (.qbo) & Standard .ofx (US / Canada / Australia MYOB & Xero)
  • SWIFT MT940 (.sta / .mt940) (Switzerland Bexio / Abacus, Netherlands Exact Online / Moneybird, Belgium, EU)
  • German DATEV EXTF (.csv) (SKR03, German comma decimals, S/H Soll/Haben flags)
  • Xero Bank Statement CSV (.csv) (*Date ISO YYYY-MM-DD / regional, *Amount, CWE-1236 formula-injection check)
  • French Pennylane / FEC Semicolon CSV (.csv) (UTF-8 BOM, ; delimiter, comma decimals)
  • Japanese Yayoi (弥生会計) / freee CSV (.csv) (half-width ASCII numerals, YYYY/MM/DD)

Want to validate, repair, or convert accounting files instantly without installing Python? Use our 5 100% Free Browser-Only Zero-Upload Tools (run entirely in local JavaScript — zero server upload, zero signup, also embeddable via 1-line <iframe> on /partners) plus our free minimal-OAuth Google Sheets Add-On:

Starting from raw bank, credit card, Wise, PayPal, or Revolut PDFs / scans / photos — or batch travel receipts?


Why Bank Statement Imports Fail in Accounting Software (Quick Reference)

Region & Software Target Format #1 Import Failure Pitfall Required Rule
US — QuickBooks Online / Desktop .qbo (Web Connect) Duplicate <FITID> causes silently skipped rows Unique <FITID> per transaction; exact <BALAMT> & <TRNAMT> decimal precision
Canada / AU / NZ — Wave, Sage 50, MYOB .ofx Date column ambiguity (MM/DD vs DD/MM) ISO-style YYYYMMDD <DTPOSTED> timestamps inside <STMTTRN>
UK / NZ / SG / HK — Xero & FreeAgent Xero .csv Missing asterisk headers or US/UK date swaps Exact *Date (unambiguous ISO YYYY-MM-DD, also accepts DD/MM/YYYY), *Amount (signed decimal), Payee, Description
Germany / Austria — DATEV & Lexoffice DATEV EXTF .csv Period decimals broken in German Excel/DATEV Semicolon ; delimiter, comma decimals (4820,50), explicit S/H column, SKR03 accounts
Switzerland — Bexio, Abacus & Crésus SWIFT MT940 (.sta) Apostrophe thousands (CHF 12'450.50) parsed as text Strip apostrophes into comma-decimal MT940 :60F: / :61: / :62F: cent-exact balance proof
Netherlands / Belgium — Exact & Moneybird SWIFT MT940 (.sta) Af / Bij unsigned columns inverted Strict D (Debit / Af) vs C (Credit / Bij) indicators with :60F: → :62F: cent proof
France — Pennylane, Indy & FEC Semicolon .csv Broken accents & decimal commas in Excel FR UTF-8 BOM encoding, ; separator, JJ/MM/AAAA, comma decimal amounts
Japan — 弥生会計 (Yayoi) & freee Accounting .csv Full-width numerals (12,450) & Wareki dates Normalized half-width ASCII integers (¥), YYYY/MM/DD, UTF-8 BOM safe
Cross-Border Wallets (Wise, PayPal, Revolut) 4-Col Gross / Fee / Net Net-only import hides deductible processing fees Split PayPal Gross + Fee = Net into separate revenue + fee ledger rows so running balance reconciles to 0.00

Zero-Dependency CLI Validator (validate_statement_export.py)

Requires Python 3.9+ (standard library only — pip install not needed).

Usage

# Auto-detect format (.sta/.mt940, .qbo/.ofx, DATEV EXTF, Xero, French FEC, or Yayoi CSV)
python validate_statement_export.py path/to/export.sta

# Explicitly specify format
python validate_statement_export.py --format mt940 examples/sample_swiss_mt940.sta
python validate_statement_export.py --format ofx examples/sample_us_quickbooks.qbo
python validate_statement_export.py --format datev examples/sample_de_datev_extf.csv
python validate_statement_export.py --format xero examples/sample_uk_xero.csv
python validate_statement_export.py --format fec examples/sample_fr_fec.csv
python validate_statement_export.py --format yayoi examples/sample_jp_yayoi.csv

# Run all 15 unit tests (v1.2.0)
python test_validator.py

What It Checks

  1. MT940 (.sta / .mt940): Required SWIFT tags (:20:, :25:, :60F:, :62F:), multi-statement block splitting, and exact Decimal cent-reconciliation Opening (:60F:) + Credits (:61: C) − Debits (:61: D) == Closing (:62F:).
  2. OFX / QuickBooks .qbo: <OFX>, <STMTTRN>, <TRNAMT>, <DTPOSTED>, <FITID>, duplicate <FITID> collision detection, unescaped & / control chars (OL-221/OL-222), <=32-char <NAME> limit, and <INTU.BID> checks.
  3. DATEV EXTF (.csv): EXTF metadata header, semicolon ; column structure, German comma decimals, positive Umsatz + strict S / H markers, TTMM Belegdatum, and <=60-char Buchungstext.
  4. Xero Bank CSV (.csv): Mandatory *Date (ISO YYYY-MM-DD / regional) and *Amount asterisk headers, numeric validation, and CWE-1236 formula-injection detection.
  5. French FEC / Pennylane CSV (.csv): Semicolon ; structure and French comma-decimal compliance.
  6. Japanese Yayoi / freee CSV (.csv): Full-width numeral (0-9) rejection, YYYY/MM/DD dates, and numeric validation.

Direct Regional PDF & Cross-Border Wallet Guides

QuickBooks .QBO Troubleshooting, Catch-Up & Mortgage Verification Guides

If you start from raw bank, credit card, or digital wallet PDFs, encrypted statements, or paper scans:

License

MIT License — free for personal, bookkeeping firm, and commercial integration use.

Metadata

Release files for bank-statement-spec 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bank-statement-spec 1.3.0
File Size Uploaded Provenance Actions
bank_statement_spec-1.3.0.tar.gz 16.3 kB Without provenance Details for bank_statement_spec-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bank-statement-spec 1.3.0
File Interpreter ABI Platform Actions
bank_statement_spec-1.3.0-py3-none-any.whl Python 3 none any Details for bank_statement_spec-1.3.0-py3-none-any.whl

Total release size: 29.4 kB

Release files / bank_statement_spec-1.3.0.tar.gz

Download URL bank_statement_spec-1.3.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a5cd51f547d97ba233817c6c8e7e339678b81a2f79197eb4fe8492f629a1f6cf
BLAKE2b-256 checksum
How to use checksums
d1cfd5a0d1107d80671f4080b2c596342f92d13ad6e45895f1fc8fbda1fc9ba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / bank_statement_spec-1.3.0-py3-none-any.whl

Download URL bank_statement_spec-1.3.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1a1e97de4739a47de1cbd107445bcabae211afebf9cbdce846b865637e1ed23
BLAKE2b-256 checksum
How to use checksums
a57375c814d6ffb039e7492f04cdd46c4c01613280205ec79fa1e188466f8b1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for bank-statement-spec 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page