Ifriqa Validator

Validate ZATCA (Fatoora) e-invoices before you submit

Check your Saudi UBL 2.1 e-invoice XML against EN 16931 and core BR-KSA rules — and see exactly what will be rejected, in plain language. Built for ERP vendors and integrators.

Glissez-déposez votre fichier XML ici

ou parcourir

XML uniquement · 1 Mo max · 20 transactions

Exemples de démonstration

Utilisez-les uniquement pour prévisualiser l'expérience de diagnostic. Votre propre XML reste le flux de travail principal.

Préférez les téléchargements ? XML valide

Les fichiers sont traités en mémoire uniquement — rien n'est stocké ni transmis à des tiers.

EN 16931 core

BR-KSA rules

Readable diagnostics

No account required

Pas seulement de la validation XML

A valid XSD is not a compliant ZATCA invoice.

ZATCA rejects invoices for EN 16931 and BR-KSA business-rule reasons XSD never checks. Ifriqa combines structure checks, EN 16931 rules, KSA-specific rules and readable reports.

CoucheCe que ça détecte
UBL 2.1 structureRequired elements, well-formedness
Règles EN 16931Invoice number, dates, type code, parties, currency
BR-KSA rulesSAR tax currency, seller VAT format, building number (SA), Previous Invoice Hash
Explanation layerHuman-readable diagnostics and machine-readable JSON

Profils supportés

Standard tax invoice (388)Debit note (383)Credit note (381)EN 16931 coreBR-KSA extensions

Built for the ZATCA Phase 2 wave

Pre-check the UBL XML your ERP or middleware produces against EN 16931 + BR-KSA before it reaches the ZATCA clearance/reporting API — and get readable reasons for every failure.

Cryptographic signature, QR content and clearance are out of scope — this is a pre-submission validator, not a generator.

Diagnostics lisibles

ErreurExplication
Missing UUID / PIHZATCA requires a UUID and a Previous Invoice Hash (hash chain) on every invoice.
Tax currency not SARThe tax currency code must be SAR for KSA invoices.
Missing building number (SA)When the party country is SA, the postal address must include a building number (BR-KSA-63).

Guides & Référence

Référence technique

Structure du document

16 champs · 14 règles · 1 tables
invoice//*[local-name()='Invoice']
invoice.profileIdProfileID
ID
invoice.idInvoice number
ID
invoice.uuidInvoice UUID
ID
invoice.issueDateIssue date
ISO_DATE_EXTENDED
invoice.typeCodeInvoice type code
CODE
invoice.currencyCodeDocument currency code
CURRENCY_CODE
invoice.taxCurrencyCodeTax currency code
CURRENCY_CODE
invoice.pihPrevious Invoice Hash (PIH)
TEXT
invoice.qrQR code (base64 TLV)
TEXT
seller.nameSeller name
TEXT
seller.vatSeller VAT registration number
VAT_KSA
seller.countryCodeSeller country code
COUNTRY_CODE
seller.buildingNumberSeller building number
TEXT
buyer.nameBuyer name
TEXT
buyer.countryCodeBuyer country code
COUNTRY_CODE
buyer.buildingNumberBuyer building number
TEXT

Champs

16 définis
IdentifiantLibelléTypeObligatoire
invoice.profileIdProfileIDID
invoice.idInvoice numberID
invoice.uuidInvoice UUIDID
invoice.issueDateIssue dateISO_DATE_EXTENDED
invoice.typeCodeInvoice type codeCODE
invoice.currencyCodeDocument currency codeCURRENCY_CODE
invoice.taxCurrencyCodeTax currency codeCURRENCY_CODE
invoice.pihPrevious Invoice Hash (PIH)TEXT
invoice.qrQR code (base64 TLV)TEXT
seller.nameSeller nameTEXT
seller.vatSeller VAT registration numberVAT_KSA
seller.countryCodeSeller country codeCOUNTRY_CODE
seller.buildingNumberSeller building numberTEXT
buyer.nameBuyer nameTEXT
buyer.countryCodeBuyer country codeCOUNTRY_CODE
buyer.buildingNumberBuyer building numberTEXT

Règles de validation

14 règles
ZATCA-PROF-001ERROR

A ZATCA invoice must carry a ProfileID (cbc:ProfileID), e.g. "reporting:1.0".

Assertion

ProfileID est obligatoire

ZATCA-HDR-001ERROR

An invoice shall have an invoice number (cbc:ID). (EN16931 BR-02)

Assertion

Invoice number est obligatoire

ZATCA-HDR-002ERROR

A ZATCA invoice must carry a unique identifier (cbc:UUID).

Assertion

Invoice UUID est obligatoire

ZATCA-HDR-003ERROR

An invoice shall have an issue date (cbc:IssueDate). (EN16931 BR-03)

Assertion

Issue date est obligatoire

ZATCA-HDR-004ERROR

An invoice shall specify a document type code (cbc:InvoiceTypeCode). (EN16931 BR-04)

Assertion

Invoice type code est obligatoire

ZATCA-HDR-005ERROR

The invoice type code must be one of the accepted ZATCA UNTDID 1001 codes (388 tax invoice, 383 debit note, 381 credit note, 386 prepayment).

Quand

Invoice type code est présent

Assertion

Invoice type code ∈ ZATCA invoice type codes (UNTDID 1001): {388, 383, 381, 386}

ZATCA-CUR-001ERROR

An invoice shall specify the document currency code (cbc:DocumentCurrencyCode).

Assertion

Document currency code est obligatoire

ZATCA-CUR-002ERROR

The tax currency code (cbc:TaxCurrencyCode) must be SAR for ZATCA invoices. (BR-KSA)

Quand

Tax currency code est présent

Assertion

Tax currency code = "SAR"

ZATCA-SEL-001ERROR

An invoice shall contain the seller name (PartyLegalEntity/RegistrationName). (EN16931 BR-06)

Assertion

Seller name est obligatoire

ZATCA-SEL-002ERROR

The seller VAT registration number (PartyTaxScheme/CompanyID) is required and must be 15 digits starting and ending with 3.

Assertion

Seller VAT registration number est obligatoire

ZATCA-BUY-001ERROR

An invoice shall contain the buyer name (PartyLegalEntity/RegistrationName). (EN16931 BR-07)

Assertion

Buyer name est obligatoire

ZATCA-KSA-01ERROR

When the buyer country is SA, the buyer postal address must include a building number (cbc:BuildingNumber). (BR-KSA-63)

Quand

Buyer country code = "SA"

Assertion

Buyer building number est obligatoire

ZATCA-KSA-02ERROR

When the seller country is SA, the seller postal address must include a building number (cbc:BuildingNumber). (BR-KSA)

Quand

Seller country code = "SA"

Assertion

Seller building number est obligatoire

ZATCA-KSA-03ERROR

A ZATCA invoice must reference the Previous Invoice Hash (AdditionalDocumentReference ID="PIH"); the first invoice uses an empty base hash. (BR-KSA hash chain)

Assertion

Previous Invoice Hash (PIH) est obligatoire

Tables de référence

1 listes

ZATCA invoice type codes (UNTDID 1001)

zatca-invoice-type-codes
388383381386

Conçu pour

  • ERP and accounting software vendors serving KSA clients
  • Integrators and middleware connecting ERPs to ZATCA
  • Developers implementing ZATCA Phase 2 export
  • Consultants debugging ZATCA rejections
FonctionnalitéGratuitPayant
Single invoice validationOuiOui
EN 16931 + BR-KSA diagnosticsOuiOui
Full business explanationPartielOui
JSON/API reportPreviewOui
Traitement par lot / ZIPNonOui
Full BR-KSA coverageCoreOui
History / saved reportsNonOui
Accès APINonOui

Need batch validation or an API for your ERP?

API access, ZIP/batch processing, saved reports and full BR-KSA coverage are planned for paid usage.

Contacter Ifriqa