Invoice type codes: 388, 381, 383, 386
A document's type is a three-digit code plus a seven-position name attribute saying whether it is standard or simplified and which flags it carries.
ZATCA uses four codes from UN/CEFACT list 1001: 388 invoice, 386 prepayment invoice (added in version 1.2), 383 debit note, 381 credit note. The UBL message type is Invoice for all of them, credit notes included.
The code alone does not separate standard from simplified, so the same element carries a seven-position name attribute: 01 for standard or 02 for simplified, then flags for third party, nominal supply, export, summary and self-billing. The standard's example for a simplified invoice is name="0200000" with code 388.
The printed copy shows not the code but the title: "Tax Invoice", "Simplified Tax Invoice", "Credit Note" or "Debit Note"; a self-billed invoice says so in its title.
In JooDax
Partly builtThe programs write 388 or 381 with 0200000. They issue no 383 or 386 and set no flags.
crates/jdx-einvoice-sa/src/xml.rs
Document types and their codes
| Code | Name | Meaning | In JooDax |
|---|---|---|---|
| 388 / 0100000 | Tax invoice (standard) | A business-to-business invoice sent to FATOORA for clearance before the buyer gets it; ZATCA stamps it. | No |
| 388 / 0200000 | Simplified tax invoice | Usually a consumer invoice, stamped by the seller's device and printed with a QR code, then reported within 24 hours. | Yes |
| 381 / 0100000 | Credit note (standard) | Reduces an earlier standard invoice and follows the same clearance path. | No |
| 381 / 0200000 | Credit note (simplified) | Reduces an earlier simplified invoice, such as a till return, and is stamped and reported like it. | Yes |
| 383 / 0100000 | Debit note (standard) | Increases the value or VAT of an earlier standard invoice; cleared. | No |
| 383 / 0200000 | Debit note (simplified) | Increases the value of an earlier simplified invoice; stamped and reported. | No |
| 386 / 0100000 | Prepayment tax invoice | An invoice for an advance payment, settled later in the final invoice (added in version 1.2). | No |
| 386 / 0200000 | Prepayment simplified tax invoice | Its simplified counterpart. | No |
Related pages
- BT-3 Invoice type code
- KSA-2 Invoice transaction code
- BR-KSA-05 · The invoice type code must be one of the Saudi subset: 388, 386, 383 or 381.
- BR-KSA-06 · The name attribute on the invoice type must exist with the structure NNPNESB.
- BR-KSA-07 · Self-billing may not be combined with the export flag.
- BR-KSA-31 · On simplified documents only the third-party, nominal and summary flags are accepted.
- BR-CL-01 · The document type code must come from UNTDID 1001.
Related concepts
- Standard versus simplified tax invoicesStandard invoices are for businesses and cleared before hand-over; simplified ones are mostly for consumers, stamped locally and reported within 24 hours.
- Credit and debit notesDocuments that correct an issued invoice: a credit note when the invoiced VAT exceeds the right amount, a debit note when it falls short.
E-invoicing in Saudi Arabia (FATOORA)
Sources
- Electronic Invoice XML Implementation Standard to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
- Electronic Invoice Data Dictionary to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
- الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
Checked on: 4 November 2026. What concerns JooDax is taken from the programs’ own code.