←Back to Guides
๐ŸฆFinancial Standardsโฑ๏ธ 12 min read•Updated November 2026•โœ๏ธBy Chris

International IBAN (ISO 13616), Mod-97 Checksums & Client-Side Invoicing Standards

Prevent costly wire transfer typos and non-compliant invoices: learn ISO 13616 IBAN layout, how ISO 7064 Mod-97-10 big-integer division catches transposition errors, and mandatory invoice data fields across EU/international billing.

#IBAN#SEPA#ISO 13616#ISO 7064#Mod-97#Invoicing#FinTech

1. Anatomy of an ISO 13616 IBAN & Country BBAN Lengths

An International Bank Account Number (IBAN) can reach up to 34 alphanumeric characters, starting with a 2-letter ISO 3166-1 country code, 2 numeric check digits, and a fixed-length Basic Bank Account Number (BBAN) unique to that country. Always strip whitespace before validation, enforce strict per-country character lengths (e.g., 18 characters for NL, 22 for DE/GB, 27 for FR), and only display 4-character blocks visually.
Country CodeFixed LengthSample Electronic FormatBank Identifier SliceCopy
NL (Netherlands)18 charactersNL91ABNA04171643004-char BIC bank prefix (ABNA)
DE (Germany)22 charactersDE893704004405320130008-digit Bankleitzahl (BLZ)
BE (Belgium)16 charactersBE685390075470343-digit bank protocol ID
GB (United Kingdom)22 charactersGB29NWBK601613319268194-char bank + 6-digit sort code
FR (France)27 charactersFR76300060000112345678901895-digit banque + 5-digit guichet

2. ISO 7064 Mod-97-10 Verification Without Floating-Point Overflow

Standard JavaScript Number loses precision past 53 bits (15-16 digits), whereas converted IBAN integers exceed 40+ digits! Either use native BigInt or iterate chunk-by-chunk using modular arithmetic: move the first 4 characters (country + check digits) to the end, expand letters A=10..Z=35, and confirm remainder === 1 modulo 97. This catches 100% of single-digit errors and virtually all adjacent digit swaps.
Zero-Overflow Chunked Mod-97 Validator (TypeScript)
export function verifyIbanMod97(raw: string): boolean {
  const clean = raw.replace(/\s+/g, '').toUpperCase();
  if (!/^[A-Z]{2}\d{2}[A-Z0-9]{10,30}$/.test(clean)) return false;
  const rearranged = clean.slice(4) + clean.slice(0, 4);
  let rem = 0;
  for (const ch of rearranged) {
    const digits = /[A-Z]/.test(ch) ? String(ch.charCodeAt(0) - 55) : ch;
    for (const d of digits) rem = (rem * 10 + Number(d)) % 97;
  }
  return rem === 1;
}

Computes exact modulo 97 over arbitrary-length IBAN strings in O(n) time with constant memory.

3. Mandatory EU VAT Invoice Fields & Tax Audit Readiness

Generating invoices directly inside browser memory keeps client names, hourly rates, and bank numbers off third-party SaaS clouds. Under EU Directive 2006/112/EC, B2B and cross-border invoices require sequential gap-free invoice numbers, supplier & customer legal addresses, VAT IDs (and explicit VAT Reverse Charge / BTW verlegd notes when applicable), line-item tax rates, and clear IBAN payment details.
Invoice ElementCompliance RequirementCommon Audit FailureCopy
Sequential Invoice IDUnique chronological series (e.g. 2026-0042)Duplicate or missing sequence gaps
Customer & Supplier VAT IDsRequired on all B2B & intra-EU suppliesOmitting buyer VAT on reverse-charge jobs
Net, Tax Rate & Gross SplitExplicit subtotal + percentage + VAT totalRounding discrepancies per line vs total

4. Greedy Net-Balance Reduction for Group Expense Settlements

When N participants share mixed receipts, naive pairwise reconciliation creates O(Nยฒ) bank transfers. Computing each person net balance (paid minus fair share) and greedily matching the largest debtor against the largest creditor guarantees at most N - 1 clean SEPA settlement transfers.
๐Ÿ‘จโ€๐Ÿ’ป
Authored & Reviewed by ChrisMayPixels • Netherlands

Independent software developer focused on client-side architectures, local-first computing, WebAssembly, and privacy-first web systems.

About MayOnlineTools→

๐ŸŽ“Explore More Guides

โœจ