Most invoicing platforms in Southeast Asia validate NPWP (Nomor Pokok Wajib Pajak) in overnight or 24–72 hour batch windows. A contractor submits an invoice with a forged or dormant tax ID on Monday morning. Your system queues it. The batch processor runs Tuesday night. By then, the invoice has already moved through your GL, possibly triggered payment workflows, and exposed you to withholding tax liability. When rejection finally lands Wednesday, you've already moved on to forty other invoices. This is not a theoretical gap. Tax authorities across the region—LHDN in Malaysia, Ditjen Pajak in Indonesia, and IRAS in Singapore—flag dormant and fabricated tax IDs on validation audits. If your batch window is 24–72 hours, you're holding that liability unpaid until the batch runs. The fix is not to run batches faster. The fix is to stop batching NPWP validation altogether. Why batch windows exist (and why they're a problem) Batch processing made sense in 2010, when real-time API calls were expensive and tax databases were sluggish. Bulk-validating 500 invoices at 2 a.m. kept costs down and reduced database load on LHDN's infrastructure. Today, that logic is inverted. Real-time NPWP validation takes 200–500 milliseconds per record and costs a fraction of a cent. The cost of a dormant tax ID sitting in your ledger for 72 hours—withholding arrears, audit penalties, reconciliation work—dwarfs the API expense. Batch windows persist because: Legacy integration path: Many invoicing platforms were built to sync with accounting software via nightly ETL jobs. Validation lived inside those batches. Synchronous API latency: If a contractor's NPWP lookup hangs for 10 seconds, batch processing hides the delay. Real-time validation exposes it. Audit trail complexity: When validation is async (batch), the audit trail is simple: invoice saved, batch job ran, result logged. Real-time validation requires event-driven logging. Pricing opacity: Some platforms charge per API call. They don't want to reveal that real-time NPWP validation would cost less than their quarterly batch service. The contractor doesn't see any of this. They see an invoice that appears to succeed, then gets rejected hours later with no clear reason why. The 72-hour liability window: what actually happens Walk through a real scenario. Monday, 9 a.m.: Contractor Budi submits an invoice for ₨ 50 million with NPWP 12.345.678.9-999.999 (fabricated). Your system accepts it, stores it in the invoice table, and triggers your accounting GL sync. Monday, 10 a.m.: GL sync runs (often real-time or hourly). The invoice posts to your accounts receivable ledger. Your AR aging report now includes this invoice. Your cash flow forecast updates. If you're on accrual accounting, revenue is recorded. Monday, 2 p.m.: Your payment workflow checks the invoice. Budi is a trusted contractor with 50 previous invoices. The system flags it for auto-approval or sends it to one approver. Approval email goes out. Tuesday, 10 a.m.: Your accounting team approves it. Payment instruction is queued for your bank (or if you're using Orin's invoicing module , it's ready to send). Your bank's ACH batch runs that afternoon. Payment leaves your account Tuesday evening. Tuesday, 11 p.m.: Your NPWP batch validation job finally runs. It connects to LHDN's API (or a third-party validator). The lookup returns: NPWP not found . Wednesday, 8 a.m.: Your system generates a rejection notice and sends it to Budi. By now: the invoice is in your GL, payment may already have cleared, and your withholding tax liability is exposed. The contractor sees only the rejection. You see a reconciliation mess and a compliance gap. Real-time NPWP validation: the workflow that blocks fraud at save The alternative is to validate NPWP in real-time, at invoice save or contractor onboarding. Validation point 1: Contractor onboarding. When Budi creates an account or adds a tax ID, call the NPWP validator immediately. If it fails, reject the tax ID before any invoice is ever created. This is the highest-leverage intervention. Validation point 2: Invoice line save. When an invoice is first drafted, validate the contractor's NPWP again. (It may have changed status since onboarding.) If invalid, block invoice save and show the error inline. The contractor can correct it before it ever enters your system. Validation point 3: Invoice submission. Before an invoice moves from draft to submitted, run a final NPWP check. This catches contractors who've since been delisted. Each layer adds 200–500 ms per call. With modern API design, that's not perceptible to a user. Handling async NPWP lookups (when the API is slow) Some regional tax databases are slower. If a single NPWP lookup takes 5+ seconds, you can't block invoice save on it—users will abandon the form. Instead: Save the invoice in draft state (not submitted). Queue the NPWP validation asynchronously in the background. When it completes, update the invoice status to validation-pending an