A valid tax ID is the difference between an invoice that clears procurement and one that stalls for weeks. In Indonesia, Malaysia, and Singapore, corporate buyers increasingly reject invoices with mismatched or unvalidated tax identifiers—NPWP, SST, and GST respectively. The problem compounds fast: a single bad ID blocks payment, triggers audit flags, and forces re-submission. Most teams catch this too late, after the invoice has bounced. The fix is cheaper and faster upstream: validate tax IDs in real time, before the invoice is even generated. Here's how to build that into your workflow—and which free APIs actually work. Why tax ID validation fails at the point of invoice Tax ID errors fall into three categories: typos, format mismatches, and outright fakes. A missing digit in an NPWP, a transposed digit in an SST, or a GST number that doesn't exist will all pass basic syntax checks. But when the invoice reaches corporate procurement or government submission systems (like MyInvois in Malaysia or e-Faktur in Indonesia), the ID fails validation and the entire invoice is rejected. By then, you've already sent the invoice, your accounting team has logged it, and your customer's accounts payable team has logged a rejection. Rework it manually, and you're now 3–7 days behind on cash. The other failure mode is silent: a customer provides their tax ID, you never validate it, and six months later during an audit, you discover the ID was invalid all along. You're now liable for the tax, the customer disputes the invoice, and reconciliation becomes a nightmare. The rule: Validate a tax ID the moment it's entered into your system—not when you hit generate invoice. NPWP validation: Indonesia's taxpayer number Indonesia's NPWP (Nomor Pokok Wajib Pajak) is a 15-digit identifier issued by the tax authority (DJP). It has a strict structure: positions and check digits matter. Format: XX.XXX.XXX.X-XXX.XXX (or often entered as 15 consecutive digits) Validation rules: Must be exactly 15 digits. Digits 10–12 represent the tax office branch code. The final digit is a check digit calculated from the first 14 digits using a weighted sum modulo 11. The NPWP is registered with the DJP—you can query it via the official portal or third-party APIs. Free validation starts with format and check-digit verification. Indonesia's tax authority (DJP) doesn't expose a public real-time lookup API, but commercial providers like OSS.GO.ID and third-party tax compliance vendors offer integration. For smaller businesses, format + check-digit validation catches ~70% of errors. For larger deals, ask the customer to provide an NPWP certificate from DJP. Integration into invoicing : Add a backend validator that checks the NPWP format and check digit the moment the customer's tax ID is entered into your system. Reject it immediately if it fails. Link to the customer's bank details and tax registration—if the NPWP doesn't match the registered NPWP for that business, halt the invoice. SST validation: Malaysia's sales and service tax Malaysia's SST (Goods and Services Tax identification number) is a unique identifier for businesses registered for Sales and Service Tax. It's also a 12-digit code, and validation is stricter than NPWP because the Malaysian tax authority (LHDN) publishes a searchable registry. Format: XX-XXX-XXXX-XXX (or 12 consecutive digits) Validation rules: Must be exactly 12 digits. Registered with LHDN—you can query it live via the LHDN online portal or partner APIs. Valid SST numbers map to a registered business entity. If a business claims exemption from SST, the SST number should not appear on the invoice. Malaysia's LHDN offers a free public query tool: CVS (Customer Validation System) . You can manually look up a business and its SST status. For automated integration, commercial tax compliance APIs (e.g., Vertex, Avalara, or local Malaysian vendors) offer real-time SST validation. Integration into your CRM and invoicing : Query LHDN's CVS (or an integrated API) when the customer's SST is entered. Return three pieces of data: (1) the business name registered against that SST, (2) the status (active, suspended, or invalid), and (3) the SST registration date. If the name doesn't match the customer's registered business name in your system, flag it for manual review before invoice generation. GST validation: Singapore's goods and services tax Singapore's GST is managed by the Inland Revenue Authority (IRAS). GST registration numbers are 9 digits plus a check letter—tightly validated by IRAS. Format: XXXXXXXXGST (9 digits + "GST" suffix, or sometimes formatted as XX-XXX-XXX-X) Validation rules: Must be exactly 9 digits followed by the letter code. Registered with IRAS—publicly queryable via the IRAS portal or APIs. Each GST number maps to a unique entity and registration status (active, revoked, or invalid). Singapore requires GST-registered businesses to invoice with their GST number; unregistered businesses must not claim GST. IRAS pr