Your invoice hits LHDN's inbox. Three days pass. No confirmation. A week later, a terse rejection lands: malformed tax ID. The payment hangs. Your client chases you. You re-submit with a corrected NPWP or UEN, burning seven days of cash flow and two hours of ops work. This happens to one in ten invoices. The brutal part: tax authorities do not always tell you why. LHDN, IRBM, or ACRA silently reject invoices with incomplete, misformatted, or unregistered tax identifiers. The invoice vanishes into a black hole. You only notice when payment doesn't arrive. Real-time tax ID validation stops this. A 60-second check—before you submit—catches 98% of these failures. The cost: ₹2–₹5 per invoice. The cost of not doing it: ₹400–₹1,200 per rejection (manual re-entry, follow-up time, delayed cash flow). Here's the playbook. Why tax ID validation fails silently Tax IDs in Southeast Asia live in fragmented registries. Indonesia's NPWP (Nomor Pokok Wajib Pajak) is a 15-digit identifier issued by the tax directorate. Singapore's UEN is nine digits. Malaysia's SST ID is eight digits. GST in Vietnam follows a different format. No central interchange checks them all in real-time. When you submit an invoice to MyInvois or e-Faktur, the system checks: Does the tax ID exist in that country's registry? Is it formatted correctly for that jurisdiction? Is the business name on the invoice registered under that ID? Is the tax ID active (not suspended, not expired)? If any check fails, the invoice is rejected. Some systems flag the error immediately. Others queue it, validate it in batch overnight, and reject it silently the next morning—by which time your client thinks the payment is being processed. The worst case: your accounting software does not validate the tax ID at all. You enter it, the invoice goes to print or PDF, and you don't discover the error until the tax authority bounces it. Real-time validation: the three-layer approach Build validation into three places: the invoice form, the pre-submission check, and the automated workflow. Layer 1: Format validation at entry The moment someone enters a tax ID, validate the format. An NPWP must be exactly 15 digits. A UEN is nine characters (digits or letters). A GST ID is ten digits. If the format is wrong, flag it immediately—do not let them proceed. NPWP: 15 digits. Pattern: XXXXXXXXXXXXXXX. No spaces, no dashes. UEN (Singapore): 9 characters. Pattern: XXXXXXXXX. First two digits are the century (19 or 20). SST ID (Malaysia): 8 or 10 digits. Registered businesses only. GST ID (Vietnam): 10 digits. Issued by tax office. If you use Orin's invoicing layer , set regex rules on the tax ID field so invalid formats are rejected at entry. A one-second feedback loop prevents downstream disasters. Layer 2: Registry lookup before submission After format validation, check if the tax ID exists in the country's registry. This is the critical step—and it costs money. Indonesia LHDN offers a free API (the e-Faktur API). You submit the NPWP and the system returns: registered, inactive, or not found. Response time is usually under two seconds. If you're invoicing Indonesian businesses, you must use this before submission. Singapore's Accounting and Corporate Regulatory Authority (ACRA) does not offer a free public API. You can pay for a commercial lookup service (₹20–₹100 per check), or you can rely on the UEN format check plus a manual fallback (see below). Malaysia's IRBM also does not offer public API access. Same approach: format check + manual flag. The math: An LHDN API call costs essentially nothing (you pay a flat annual fee to access e-Faktur, around ₹2–₹5 per invoice if amortized). A commercial lookup service costs ₹20–₹100 per unique check. If you invoice fifty Indonesian businesses, the LHDN API pays for itself immediately. If you invoice three Singaporean businesses, a commercial lookup is overkill—manual review is cheaper. Layer 3: Catch-and-flag workflow If the validation fails or you cannot verify the tax ID, do not submit the invoice. Instead, flag it and route it to a human reviewer. Build a workflow: Invoice created. Format validation runs automatically. Tax ID is checked against format rules. If format is invalid: Invoice is marked 'Awaiting Tax ID Correction'. The entry person gets a notification. They fix it and resubmit. If format is valid: If an API is available (LHDN), the invoice is checked against the registry in real-time. If the check fails, the invoice is marked 'Tax ID Unverified' and routed to the finance manager. If the check passes (or is not available): Invoice moves to the next step in your workflow (approval, scheduled for submission, etc.). Finance manager reviews. They can manually verify the tax ID via the country's tax office portal (usually a 5-minute check) and either approve or reject the invoice. This workflow prevents automatic submission of bad invoices. It also creates an audit trail: every flag, every override, every manual approval is logged. Fal