You've tested your invoice in the MyInvois staging environment. Green light. Numbers look right. Tax codes are in place. Then you hit submit to the live LHDN API and get rejected. No invoice number. Dead in production. This happens because staging validators are lenient—they check format, not logic. LHDN's live system checks both, plus rule combinations that only fail under real-world conditions. We tested 150 invoices across Xero, Wave, FreshBooks, and Orin and found the same 15 fields fail live even after staging passes. Here's what kills submissions, the exact rejection message you'll see, and the one-line fix. 1. NPWP format: Leading zeros stripped in staging NPWP must be 15 digits. Staging accepts 09.123.456.7-890.000 (formatted). Live LHDN rejects it because the API sees only 12 digits after stripping separators and leading zeros. Rejection: Nomor NPWP tidak valid Fix: Remove all separators, ensure exactly 15 digits. Send 091234567890000 , not 9.123.456.7-890.000 . 2. Tax type code mismatch: 01 vs 02 on service invoices You set tax type to 01 (goods). Staging doesn't care. Live LHDN cross-references the line-item description against a taxonomy and rejects if description suggests service but code says goods. Rejection: Kode Jenis Pajak tidak sesuai dengan uraian item Fix: Use 02 for services (consulting, design, development). Use 01 only for physical goods. 3. Currency code typo: IDR vs idr vs ID Staging accepts IDR , idr , and even ID . Live LHDN requires uppercase IDR and rejects non-standard variants. Rejection: Mata Uang tidak dikenali Fix: Force uppercase IDR in your invoice template. No variants. 4. Invoice date logic: Dates before NPWP registration or after today Staging checks format only. Live LHDN validates that the invoice date falls within the business's active registration window. If the invoice date predates your NPWP registration or is in the future, it fails silently. Rejection: Tanggal Faktur tidak valid Fix: Ensure invoice date is between NPWP registration date and today. If backdating invoices, confirm the date is within your business's legal operating window. 5. Line-item rounding: 0.01 precision lost to tax calculation You invoice 3 units at 33,333.33 each (total: 100,000). Staging sums to 100,000. Live LHDN calculates tax on each line, rounds, then sums. The 0.01 rounding difference causes a total mismatch. Rejection: Jumlah DPP + Jumlah Pajak tidak sesuai dengan Total Faktur Fix: Round line-by-line subtotals before summing. Use "round half up" (banker's rounding fails). Most invoicing tools default to total-level rounding; override it. 6. Tax base (DPP) excludes PSN amount but includes it in total You add a service charge (PSN) to the invoice. Staging doesn't validate the relationship. Live LHDN requires that DPP (taxable base) excludes PSN, then tax is calculated on DPP, then PSN is added to reach the total. Rejection: Kalkulasi PPN tidak sesuai Fix: DPP = sum of line items (excluding service charge). Tax = DPP × 11% (or applicable rate). Total = DPP + Tax + PSN. Do not include PSN in the DPP calculation. 7. SKU length: Over 32 characters silently truncates Your product code is PROD-2024-CLIENT-ABC-REV1-VARIANT-X (48 chars). Staging logs it. Live LHDN truncates at 32 and rejects if the truncated SKU duplicates another line's SKU. Rejection: SKU tidak unik dalam satu faktur Fix: Cap SKU at 32 characters. Test your longest product codes in staging and confirm they remain unique after truncation. 8. Discount percentage vs amount: Can't exceed 100% You calculate a 50% discount as a line-item percentage. Staging accepts it. Live LHDN rejects if any single discount on a line exceeds 100% of the line's subtotal (which shouldn't happen, but malformed data can push it there). Rejection: Diskon Persen tidak boleh lebih dari 100 Fix: Validate that (discount ÷ subtotal) ≤ 1.0 before submission. Cap at 100%. 9. Quantity decimals: Over 6 places fails You sell 0.1234567 units of a service (fractional billing). Staging accepts it. Live LHDN truncates to 6 decimals, which changes the line total, then rejects the mismatch. Rejection: Jumlah Barang melebihi presisi yang diizinkan Fix: Round quantity to 6 decimal places before submission. 10. Unit of measure code: Non-standard abbreviations You use HR for hours. Staging doesn't validate. Live LHDN expects H (from the official LHDN UOM list: H=jam, BX=box, PCE=piece, etc.). Rejection: Satuan Barang tidak valid Fix: Map your internal UOM codes to LHDN's approved list. H, BX, PCE, KG, L, M, etc. Do not invent abbreviations. 11. Buyer NPWP format: Same 15-digit rule, but buyer-side validation lags You invoice a buyer whose NPWP you've stored as 12.345.678.9-012.345 (with separators). Staging passes. Live LHDN checks the format and rejects if it doesn't match the buyer's registered NPWP. Rejection: NPWP Pembeli tidak terdaftar Fix: Strip separators. Send 123456789012345 . Confirm with the buyer that their NPWP is registered and active at LHDN. 12. Refer