A finance team in Kuala Lumpur caught a bad UEN in their invoice batch—10 digits instead of 9—only after their accountant flagged it during monthly reconciliation. By then, the invoice had synced to their GL, their tax file was tainted, and the correction cost them four hours of manual ledger rewrites. The invoice platform they used—a reputable one—had no format validation rule for UEN. This is common. Most invoicing platforms validate that a tax ID exists in some field, but they don't validate the format or checksum of NPWP (Indonesia), UEN (Singapore), BRN (Malaysia), or TIN (Thailand). Your accounting team pays the cost. Here's what each tax ID format actually requires, how to validate them before invoicing, and which platforms do it natively. NPWP (Indonesia): 15 digits, one checksum position An Indonesian NPWP (Nomor Pokok Wajib Pajak) is 15 digits. The format is: XX.XXX.XXX.X-XXX.XXX Breaking it down: Digits 1–2: Area code (01–34, assigned by tax office). Digits 3–5: Serial number part 1. Digits 6–8: Serial number part 2. Digit 9: Check digit (computed from digits 1–8). Digits 10–15: Branch code (usually 000000 for head office). The check digit in position 9 uses a weighted sum algorithm: Take the first 8 digits and assign weights: 2, 6, 4, 8, 5, 7, 1, 5 (left to right). Multiply each digit by its weight and sum the products. Divide by 11 and take the remainder. Subtract the remainder from 11. If the result is 10, use 0; if 11, use 1. Otherwise, use the result. Real example: NPWP 12.345.678.1-000.000. Check digit calculation: 1×2 + 2×6 + 3×4 + 4×8 + 5×5 + 6×7 + 7×1 + 8×5 = 2 + 12 + 12 + 32 + 25 + 42 + 7 + 40 = 172 172 mod 11 = 7 11 − 7 = 4 Position 9 must be 4. If it's not, the NPWP is invalid. A common error: omitting the check digit or using a hardcoded 0. Your invoicing system should reject both. UEN (Singapore): 9 digits, checksum alpha-numeric A Singapore UEN (Unique Entity Number) is 9 characters: 8 digits plus 1 letter. The format is: XXXXXXXXX (8 digits + 1 check letter) The check letter is computed using a weighted modulo-11 algorithm: Assign weights to the 8 digits: 5, 4, 3, 2, 7, 6, 5, 4 (left to right). Multiply each digit by its weight and sum. Divide by 11 and take the remainder. Map the remainder to a letter using ACDEFGHUJKLMNPRTVWXZ (order matters: 0→A, 1→C, 2→D, etc.). Real example: UEN 53001234. Check letter calculation: 5×5 + 3×4 + 0×3 + 0×2 + 1×7 + 2×6 + 3×5 + 4×4 = 25 + 12 + 0 + 0 + 7 + 12 + 15 + 16 = 87 87 mod 11 = 10 Position 10 (remainder 10) maps to letter J. UEN is 53001234J. Mistakes: entering a random letter instead of computing the check letter; submitting only 8 digits. Most invoicing platforms accept UEN but don't validate the letter. BRN (Malaysia): 9 digits, format rules matter more than checksum A Malaysian BRN (Business Registration Number) is 9 digits with no formal checksum algorithm published by the Suruhanjaya Syarikat Malaysia (SSM). However, the format carries meaning: XXXXXXXXX (always 9 digits) The structure is: Digits 1–6: Date of incorporation in YYMMDD format (Jan 1, 2020 = 200101). Digits 7–9: Serial number assigned by SSM (usually sequential). Real example: BRN 202312001. Parsing: 202312 = December 2023. 001 = first company registered that day in that batch. Validation rules: All 9 characters must be digits (no letters, no punctuation). Digits 1–6 must represent a valid date (1960 or later; not a future date). Digits 7–9 must be between 001 and 999. Common errors: entering 8 digits; using leading zeros incorrectly; submitting a date that hasn't occurred yet. Because SSM doesn't publish a checksum, you cannot detect a transposed BRN algorithmically—only through lookup. That lookup requires either an SSM API (not commonly available) or manual verification. TIN (Thailand): 13 digits, light validation only A Thai TIN (Tax Identification Number) is 13 digits, formatted as: XX-XXXX-XXXXX-XX-X Breaking it down: Digits 1–2: Province code. Digits 3–6: Tax office code. Digits 7–11: Registration number. Digits 12–13: Branch code. Thailand's Revenue Department does not publish a public checksum algorithm. Validation is mostly format checking: Must be exactly 13 digits (when hyphens are stripped). Digits 1–2 and 3–6 should match known province and tax office codes (requires a lookup table). Digits 12–13 should be between 00 and 99. Real example: TIN 10-1234-56789-00-0. Format is correct; algorithm-based validation is not possible without an official lookup. Which invoicing platforms validate natively? We tested three categories: cloud invoicing, accounting software, and bundled business platforms. Xero: Validates NPWP format (15 digits, correct structure) and UEN format (9 alphanumeric) but does not compute checksums. Will accept an NPWP with the wrong check digit. BRN and TIN validation is minimal—format only. QuickBooks Online: Accepts tax IDs as text fields with no format validation. A malformed NPWP, UEN, or BRN will sync to your books without complaint. QuickBo