Skip to main content

Technical Guides

E-Invoicing Troubleshooting & Integration Guides

Focused engineering deep-dives on the highest-frequency ZATCA and Jordan JoFotara integration failures.

Saudi ZATCA · National Address

Resolving ZATCA National Address Errors: BR-KSA-37, BR-KSA-66 & BR-KSA-65 (Under Review)

ZATCA v1.2 address rules enforce exact digit lengths: 4 digits for BuildingNumber (BR-KSA-37) and 5 digits for PostalZone (BR-KSA-66/67). GIC also flags a non-4-digit PlotIdentification as BR-KSA-64/65; those rule IDs are under review (absent from the clean v1.2 rule list, SDK check pending). If the additional number is unknown, omit PlotIdentification instead of passing a 2-digit office number.

Saudi ZATCA · QR TLV

Avoiding UTF-8 Byte-Length Corruption in Arabic ZATCA QR TLV Payloads

Every Arabic character consumes 2 bytes in UTF-8. Computing TLV Tag 1 length via string character count instead of UTF-8 byte count shifts all subsequent tags (2–5) and breaks scanners. For Phase 2, keep Tags 8 & 9 as raw binary bytes so total Base64 stays <= 700 characters.

Jordan · ISTD JoFotara

Jordan JoFotara Subtype Matrix (011–023) & 3-Decimal JOD Precision

JoFotara encodes trade, payment method, and taxpayer family into InvoiceTypeCode/@name: 01x (Cash) vs 02x (Receivable), ending in 1 (Income), 2 (General Sales), or 3 (Special Sales). Always include SellerSupplierParty for income source sequence and quantize JOD totals to 3 decimal places (fils).

ERP Architecture · Exact Math

Why Binary Floating-Point Breaks BR-KSA-51 and BR-CO-15 VAT Reconciliation

Binary IEEE-754 floats introduce representation drift across multi-line invoices, triggering BR-KSA-51 and BR-CO-15 mismatches, as well as GIC's line VAT check (BR-KSA-50, under review). Always compute line net, line VAT, subtotals, and payable amounts using fixed-point Decimal with ROUND_HALF_UP.