← Blog Guides 11 min read · 14 September 2026

Saudi e-invoicing glossary: every term, acronym and field code in ZATCA Phase 2

An open reference spread with abbreviations ruled down one column — CSID, PIH, ICV, TLV — and a single plain sentence against each
Every entry is written to survive being quoted on its own, without the paragraph around it.

Phase 2 arrives with a vocabulary before it arrives with a deadline: every term, acronym and field code met between the Fatoora portal and a first cleared invoice. For the sequence they sit in, read what Phase 2 requires; for one document's fields, the tax invoice checklist.

The phases and the acts

TermDefinition
ZATCAThe Zakat, Tax and Customs Authority: the Saudi authority behind the regulation, the platform and the validation rules.
Phase 1 (Generation)Mandatory since 4 December 2021: invoices produced by a system, not by hand, with a QR code on simplified invoices. Nothing is transmitted at issue.
Phase 2 (Integration)The stage that connects your system to ZATCA: UBL 2.1 XML, cryptographically stamped, hash-linked to the one before, cleared or reported.
WaveThe group a taxpayer joins Phase 2 in, each with its own date. Wave 25: VAT-taxable revenue above 187,500 SAR in any of 2022 to 2025, integrating 1 February 2027.
ClearanceThe path for standard tax invoices: cleared by ZATCA before sharing, so the buyer receives what the Authority returned.
ReportingThe path for simplified tax invoices: given to the customer at once, reported within 24 hours.
Fatoora platformZATCA's e-invoicing platform, where a taxpayer onboards an issuing unit and generates its onboarding code.

The documents

TermDefinition
Standard tax invoiceIssued to a business or government buyer (B2B, B2G), cleared before sharing, with the buyer's VAT number and address: a registered buyer cannot deduct input VAT from a simplified one.
Simplified tax invoiceIssued to a consumer (B2C), handed over at once and reported within 24 hours. No buyer VAT number.
Credit note (381)Reduces a previously issued invoice; needs a reason (BR-KSA-17, error) and a reference to the original (BR-KSA-56, warning). A cleared invoice is noted, never deleted.
Debit note (383)Increases a previously issued invoice, under the same two obligations. Notes in practice covers which to use.
Invoice type code (BT-3)What the document is: 388 invoice, 386 prepayment invoice, 381 credit note, 383 debit note, from UN/CEFACT code list 1001 (BR-KSA-05, error).
UBL 2.1Universal Business Language 2.1, the XML schema the invoice is expressed in: fixed element order and controlled code lists — a schema to satisfy, not a template.
XMLThe format the invoice is issued in; a PDF is only a rendering. Retention is six years in the format issued.

The cryptography and the chain

TermDefinition
EGS unitAn issuing unit in ZATCA's model — what a certificate is issued to; the abbreviation is used as is. One queue is one unit, three simultaneous tills are three.
CSRCertificate signing request: what your software builds, carrying the establishment's VAT number, name, address and the document types it issues.
Compliance CSIDReturned when the onboarding code is accepted; it runs the compliance checks and cannot sign live invoices.
Production CSIDThe certificate that signs live invoices, with an expiry date after which submissions stop being accepted.
OTP (onboarding code)A single-use code from the Fatoora portal, authorising one issuing unit to obtain a certificate. Not a login password.
Cryptographic stamp (KSA-15)The signature block inside the XML binding the document to the certificate that signed it (BR-KSA-30, error).
XAdESXML Advanced Electronic Signatures: the standard for embedding a signature and its supporting data inside the XML document.
Digital signatureA value computed over the invoice with the unit's private key; the public key proves that key signed these bytes.
Public keyThe published half of the key pair, in the certificate and in the Phase 2 QR code. It verifies, never signs.
HashA fixed-length digest, here SHA-256: the same input always gives the same digest, any change a different one.
PIH (KSA-13)Previous invoice hash: the Base64-encoded SHA-256 digest of the document issued immediately before this one by the same unit. BR-KSA-61 and BR-KSA-26 are warnings: a broken chain is accepted quietly.
ICV (KSA-16)Invoice counter value: one up per document, never reset, digits only (BR-KSA-33 and BR-KSA-34, errors).
Invoice chainWhat counter and hash form together: each document states its position and carries the digest of the one before.
UUID (KSA-1)The machine identifier for the document in the exchange with the Authority — letters, digits and dashes, not the invoice number (BR-KSA-03, error).

The QR code

The code at the foot of a Saudi e-invoice is not a link and opens nothing. It is a Base64 string — binary as plain characters, so it survives printing — holding fields in TLV encoding: a one-byte tag, a length, then the value.

TagsWhat they hold
1 to 5Seller name, seller VAT number, invoice timestamp, invoice total with VAT, VAT total — all a Phase 1 code carries.
6 to 8Hash of the XML, the signature, the public key of the stamp — none exists unless the document was genuinely stamped.
9Where present, ZATCA's signature over the seller's public key, added on clearance: a ninth tag marks a cleared standard invoice.

Decode any invoice QR code at our QR code reader — in the browser, no sign-in — or check a supplier invoice.

The field codes

Two naming systems sit side by side in ZATCA's messages. BT-nn identifiers come from EN 16931, the European semantic model that gives every business term on an invoice a stable number. KSA-nn identifiers name the fields the Saudi specification adds — counter, hash, transaction code — with no European equivalent.

CodeWhat it holdsRule that names it
BT-2Document issue date; not later than today.BR-KSA-04, error
BT-3Invoice type code: 388, 386, 381, 383.BR-KSA-05, error
BT-5Invoice currency code, per ISO 4217.BR-KSA-CL-01, error
BT-6Tax currency code, the currency VAT is accounted in; must be SAR.BR-KSA-68, BR-KSA-EN16931-02, errors
BT-31Seller VAT registration number: 15 digits, first and last digit 3.BR-KSA-39, BR-KSA-40, errors
BT-46Other buyer identification, where the buyer is not VAT-registered, with a scheme (BT-46-1): TIN, CRN, MOM, MLS, 700, SAG, NAT, GCC, IQA, OTH.BR-KSA-14, error
BT-48Buyer VAT registration number: 15 digits, first and last digit 3, never the seller's own.BR-KSA-44, BR-CUSTOM-VALIDATION-01, errors
BT-121VAT exemption or exception reason code, where the category is zero-rated, exempt or not subject to VAT.BR-KSA-49, error; BR-KSA-CL-04, warning
BT-151Invoiced item VAT category code, per line: S, Z, E or O.BR-KSA-18, error
BT-152Invoiced item VAT rate, per line; zero where not subject to VAT.BR-KSA-11, error
KSA-1The document UUID.BR-KSA-03, error
KSA-11Line VAT amount; mandatory on a standard invoice and its notes.BR-KSA-52, error
KSA-12Line amount with VAT: line net amount plus line VAT amount.BR-KSA-53, error
KSA-13Previous invoice hash (PIH).BR-KSA-61, BR-KSA-26, warnings
KSA-15The document cryptographic stamp.BR-KSA-30, error; BR-KSA-60, warning
KSA-16Invoice counter value (ICV), digits only.BR-KSA-33, BR-KSA-34, errors
KSA-25Invoice issue time, hh:mm:ss local or hh:mm:ssZ in UTC; a field of its own.BR-KSA-70, error

The validation vocabulary

TermDefinition
Validation ruleOne machine-checkable condition in ZATCA's schematron, identified by a code. All run at once, so a document can return several.
BR-KSA-nnThe identifier of a Saudi business rule; related families are BR-KSA-EN16931-nn, BR-KSA-F-nn for format, BR-KSA-CL-nn for code lists.
Severity: errorThe document is rejected: nothing was cleared or reported, and the invoice does not exist for the Authority.
Severity: warningThe document is accepted and the defect recorded: a successful submission is not proof of a complete invoice.

Of the 135 rules we index from ZATCA's SDK schematron, 44 are errors and 91 warnings. Our error code reference documents all 135, about thirty with written guides; how to read a rejection covers the rest.

The tax vocabulary

Definitions, not advice: which treatment applies to a supply is a question for an accountant and zatca.gov.sa.

TermDefinition
VAT category codeOne letter per line saying how the supply is treated, from a closed list of four — a letter, not a rate: 15 here rejects.
SStandard rated: VAT charged at the standard rate.
ZZero rated: taxable, at a rate of zero.
EExempt from VAT: outside the charge by exemption.
ONot subject to VAT, outside the scope; the line rate is then zero.
Exemption reason codeThe coded reason (BT-121) for a zero-rated, exempt or not-subject category, from ZATCA's list rather than written freely.
Output VATVAT a business charges on the supplies it makes: the VAT on the invoices it issues.
Input VATVAT a business is charged on the supplies it receives — the deduction a registered buyer loses on a simplified invoice.
Tax pointThe moment VAT becomes due: the earlier of supply, invoice or payment. Invoicing early moves it forward, never back.
Taxable supplyA supply within the scope of Saudi VAT, standard-rated or zero-rated. Exempt supplies are not.

These rules come from one SDK release's schematron; a later release can change a message, a severity or a field. zatca.gov.sa governs.

To have these fields filled for you: ZATCA Tools connects to Fatoora in minutes with one OTP, signs every invoice with a compliant QR code, clears standard invoices and reports simplified ones, and keeps the signed XML six years, downloadable. Rejections come back with the official code and a link to its guide. It also issues quotations, credit and debit notes, receipt vouchers, per-customer statements, and branches with their own device and chain. Integrations: WooCommerce, Shopify, n8n, WHMCS, a REST API and a Partner API. Not an accounting system. Free to start: 50 invoices or 30 days from the day you connect, whichever comes first, then from 49 SAR a month — start here, or browse the free tools.

Frequently asked questions

What is PIH in ZATCA e-invoicing? +
PIH is the previous invoice hash, field KSA-13: a Base64-encoded SHA-256 digest of the document issued immediately before this one by the same issuing unit. It is what links invoices into a chain, so that a document removed or altered after the fact breaks the sequence. The first document in a chain carries the fixed starting value the specification defines rather than an empty field. Both rules that check it, BR-KSA-61 and BR-KSA-26, carry the severity warning, so a broken chain is accepted and recorded rather than rejected.
What is a CSID in Saudi e-invoicing? +
A CSID is the certificate ZATCA issues to one onboarded issuing unit, binding that unit's public key to the establishment so the invoices it stamps can be attributed. The specification uses the abbreviation as is. There are two: a compliance CSID, which exists only to run the compliance checks, and a production CSID, which signs live invoices and carries an expiry date. Signing a live invoice with the compliance pair is a common and silent misconfiguration.
What is the ICV on a Saudi e-invoice? +
ICV is the invoice counter value, field KSA-16: a counter that increments by one for every document an issuing unit produces and is never reset. It is not the invoice number a customer reads, and it takes digits and nothing else — BR-KSA-33 requires it to exist and BR-KSA-34 requires it to be numeric, and both reject the document. A counter written as INV-001 satisfies the first rule and fails the second.
What is the difference between clearance and reporting? +
Clearance is the path for standard tax invoices: the document is sent to ZATCA and cleared before it is shared with the buyer, so the invoice the buyer receives is the one the Authority returned. Reporting is the path for simplified tax invoices: the document is given to the customer at once and sent to the Authority within 24 hours. One is a gate before the customer sees the invoice; the other is a deadline after.
What is a BT code and what is a KSA code? +
BT-nn identifiers come from EN 16931, the European semantic model for electronic invoicing, which gives each business term on an invoice a stable number — BT-3 is the invoice type code in any system that follows it. KSA-nn identifiers name fields the Saudi specification adds on top, such as KSA-13 for the previous invoice hash and KSA-16 for the invoice counter. Both appear side by side in ZATCA validation messages, which is the fastest way to learn what a code means.
What is TLV encoding in an invoice QR code? +
TLV means tag, length, value: each field is written as a one-byte tag saying which field it is, a length in bytes, then the value itself, and the fields are concatenated and Base64-encoded into the string the QR code carries. It is why a Saudi invoice QR code is not a link and opens nothing when scanned by a general-purpose reader. You can decode any invoice QR code at our QR code reader with no sign-in.
What is the difference between an error and a warning in a ZATCA validation response? +
An error rejects the document: it does not exist as far as the Authority is concerned, and nothing has been cleared or reported. A warning is returned alongside acceptance: the invoice is valid and the defect is recorded against it. Of the 135 rules in the SDK schematron we index, 44 are errors and 91 are warnings, which is why a successful submission is not proof that an invoice is complete.
Ready to connect your business?

Connecting is free and takes under five minutes.

Start for free