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.
| Couche | Ce que ça détecte |
|---|---|
| UBL 2.1 structure | Required elements, well-formedness |
| Règles EN 16931 | Invoice number, dates, type code, parties, currency |
| BR-KSA rules | SAR tax currency, seller VAT format, building number (SA), Previous Invoice Hash |
| Explanation layer | Human-readable diagnostics and machine-readable JSON |
Profils supportés
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
| Erreur | Explication |
|---|---|
| Missing UUID / PIH | ZATCA requires a UUID and a Previous Invoice Hash (hash chain) on every invoice. |
| Tax currency not SAR | The 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//*[local-name()='Invoice']invoice.profileIdProfileIDinvoice.idInvoice numberinvoice.uuidInvoice UUIDinvoice.issueDateIssue dateinvoice.typeCodeInvoice type codeinvoice.currencyCodeDocument currency codeinvoice.taxCurrencyCodeTax currency codeinvoice.pihPrevious Invoice Hash (PIH)invoice.qrQR code (base64 TLV)seller.nameSeller nameseller.vatSeller VAT registration numberseller.countryCodeSeller country codeseller.buildingNumberSeller building numberbuyer.nameBuyer namebuyer.countryCodeBuyer country codebuyer.buildingNumberBuyer building numberChamps
16 définis| Identifiant | Libellé | Type | Obligatoire |
|---|---|---|---|
invoice.profileId | ProfileID | ID | — |
invoice.id | Invoice number | ID | — |
invoice.uuid | Invoice UUID | ID | — |
invoice.issueDate | Issue date | ISO_DATE_EXTENDED | — |
invoice.typeCode | Invoice type code | CODE | — |
invoice.currencyCode | Document currency code | CURRENCY_CODE | — |
invoice.taxCurrencyCode | Tax currency code | CURRENCY_CODE | — |
invoice.pih | Previous Invoice Hash (PIH) | TEXT | — |
invoice.qr | QR code (base64 TLV) | TEXT | — |
seller.name | Seller name | TEXT | — |
seller.vat | Seller VAT registration number | VAT_KSA | — |
seller.countryCode | Seller country code | COUNTRY_CODE | — |
seller.buildingNumber | Seller building number | TEXT | — |
buyer.name | Buyer name | TEXT | — |
buyer.countryCode | Buyer country code | COUNTRY_CODE | — |
buyer.buildingNumber | Buyer building number | TEXT | — |
Règles de validation
14 règlesZATCA-PROF-001ERRORA ZATCA invoice must carry a ProfileID (cbc:ProfileID), e.g. "reporting:1.0".
ProfileID est obligatoire
ZATCA-HDR-001ERRORAn invoice shall have an invoice number (cbc:ID). (EN16931 BR-02)
Invoice number est obligatoire
ZATCA-HDR-002ERRORA ZATCA invoice must carry a unique identifier (cbc:UUID).
Invoice UUID est obligatoire
ZATCA-HDR-003ERRORAn invoice shall have an issue date (cbc:IssueDate). (EN16931 BR-03)
Issue date est obligatoire
ZATCA-HDR-004ERRORAn invoice shall specify a document type code (cbc:InvoiceTypeCode). (EN16931 BR-04)
Invoice type code est obligatoire
ZATCA-HDR-005ERRORThe invoice type code must be one of the accepted ZATCA UNTDID 1001 codes (388 tax invoice, 383 debit note, 381 credit note, 386 prepayment).
Invoice type code est présent
Invoice type code ∈ ZATCA invoice type codes (UNTDID 1001): {388, 383, 381, 386}
ZATCA-CUR-001ERRORAn invoice shall specify the document currency code (cbc:DocumentCurrencyCode).
Document currency code est obligatoire
ZATCA-CUR-002ERRORThe tax currency code (cbc:TaxCurrencyCode) must be SAR for ZATCA invoices. (BR-KSA)
Tax currency code est présent
Tax currency code = "SAR"
ZATCA-SEL-001ERRORAn invoice shall contain the seller name (PartyLegalEntity/RegistrationName). (EN16931 BR-06)
Seller name est obligatoire
ZATCA-SEL-002ERRORThe seller VAT registration number (PartyTaxScheme/CompanyID) is required and must be 15 digits starting and ending with 3.
Seller VAT registration number est obligatoire
ZATCA-BUY-001ERRORAn invoice shall contain the buyer name (PartyLegalEntity/RegistrationName). (EN16931 BR-07)
Buyer name est obligatoire
ZATCA-KSA-01ERRORWhen the buyer country is SA, the buyer postal address must include a building number (cbc:BuildingNumber). (BR-KSA-63)
Buyer country code = "SA"
Buyer building number est obligatoire
ZATCA-KSA-02ERRORWhen the seller country is SA, the seller postal address must include a building number (cbc:BuildingNumber). (BR-KSA)
Seller country code = "SA"
Seller building number est obligatoire
ZATCA-KSA-03ERRORA ZATCA invoice must reference the Previous Invoice Hash (AdditionalDocumentReference ID="PIH"); the first invoice uses an empty base hash. (BR-KSA hash chain)
Previous Invoice Hash (PIH) est obligatoire
Tables de référence
1 listesZATCA invoice type codes (UNTDID 1001)
zatca-invoice-type-codesConç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é | Gratuit | Payant |
|---|---|---|
| Single invoice validation | Oui | Oui |
| EN 16931 + BR-KSA diagnostics | Oui | Oui |
| Full business explanation | Partiel | Oui |
| JSON/API report | Preview | Oui |
| Traitement par lot / ZIP | Non | Oui |
| Full BR-KSA coverage | Core | Oui |
| History / saved reports | Non | Oui |
| Accès API | Non | Oui |
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.