Paperbolt is now live on the Shopify App Store Browse the listing
Saudi Arabia Validator-passing

Saudi ZATCA Phase 2

Bilingual Arabic and English tax invoice with embedded UBL 2.1 XML, cryptographic stamp slot, and QR placeholder. ZATCA Phase 2 (integration phase) is rolling out by enterprise size; new merchants entering the system inherit the requirements.

Live preview Rendered through the same Chromium pipeline that ships the PDF
Invoice STC-2026-0731
Peppol BIS Billing 3.0
Issue 12 May 2026
Due 11 Jun 2026
From
شركة النخيل للتصميم / Palm Design Co.
King Fahd Road 4231
12333 Riyadh
SA
VAT 310175397500003
To
مؤسسة الواحة للتجارة / Oasis Trading Est.
Al Olaya Street 88
11564 Riyadh
SA
VAT 311997250800003
DescriptionQtyUnitVATAmount
Brand identity workshop (3 days)3.001800.0015%5400.00
Arabic typography licensing (annual)1.002200.0015%2200.00
SubtotalSAR 7600.00
VATSAR 1140.00
Total dueSAR 8740.00
صافي 30 يوم / Net 30 days.
Sample structured output UBL 2.1 (ZATCA profile)
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
  <cbc:ProfileID>clearance:1.0</cbc:ProfileID>
  <cbc:ID>STC-2026-0731</cbc:ID>
  <cbc:UUID>6a030f38-000d-47ea-8084-18cfc64d1587742</cbc:UUID>
  <cbc:IssueDate>2026-05-12</cbc:IssueDate>
  <cbc:IssueTime>11:30:00</cbc:IssueTime>
  <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>
  <cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
  <cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
  <cac:AdditionalDocumentReference>
    <cbc:ID>ICV</cbc:ID>
    <cbc:UUID>1</cbc:UUID>
  </cac:AdditionalDocumentReference>
  <cac:AdditionalDocumentReference>
    <cbc:ID>PIH</cbc:ID>
    <cac:Attachment>
      <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ==</cbc:EmbeddedDocumentBinaryObject>
    </cac:Attachment>
  </cac:AdditionalDocumentReference>
  <cac:AdditionalDocumentReference>
    <cbc:ID>QR</cbc:ID>
    <cac:Attachment>
      <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">PLACEHOLDER-BASE64-TLV-QR</cbc:EmbeddedDocumentBinaryObject>
    </cac:Attachment>
  </cac:AdditionalDocumentReference>
  <cac:AccountingSupplierParty>
    <cac:Party>
      <cac:PartyName>
        <cbc:Name>شركة النخيل للتصميم / Palm Design Co.</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>King Fahd Road 4231</cbc:StreetName>
        <cbc:CityName>Riyadh</cbc:CityName>
        <cbc:PostalZone>12333</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>SA</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>310175397500003</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>شركة النخيل للتصميم / Palm Design Co.</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:AccountingSupplierParty>
  <cac:AccountingCustomerParty>
    <cac:Party>
      <cac:PartyName>
        <cbc:Name>مؤسسة الواحة للتجارة / Oasis Trading Est.</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Al Olaya Street 88</cbc:StreetName>
        <cbc:CityName>Riyadh</cbc:CityName>
        <cbc:PostalZone>11564</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>SA</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>311997250800003</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>مؤسسة الواحة للتجارة / Oasis Trading Est.</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:AccountingCustomerParty>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="SAR">1140.00</cbc:TaxAmount>
    <cac:TaxSubtotal>
      <cbc:TaxableAmount currencyID="SAR">7600.00</cbc:TaxableAmount>
      <cbc:TaxAmount currencyID="SAR">1140.00</cbc:TaxAmount>
      <cac:TaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>15</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:TaxCategory>
    </cac:TaxSubtotal>
  </cac:TaxTotal>
  <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="SAR">7600.00</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="SAR">7600.00</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="SAR">8740.00</cbc:TaxInclusiveAmount>
    <cbc:PayableAmount currencyID="SAR">8740.00</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>
  <cac:InvoiceLine>
    <cbc:ID>1</cbc:ID>
    <cbc:InvoicedQuantity unitCode="DAY">3.00</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="SAR">5400.00</cbc:LineExtensionAmount>
    <cac:Item>
      <cbc:Name>Brand identity workshop (3 days)</cbc:Name>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>15</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="SAR">1800.00</cbc:PriceAmount>
    </cac:Price>
  </cac:InvoiceLine>
  <cac:InvoiceLine>
    <cbc:ID>2</cbc:ID>
    <cbc:InvoicedQuantity unitCode="EA">1.00</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="SAR">2200.00</cbc:LineExtensionAmount>
    <cac:Item>
      <cbc:Name>Arabic typography licensing (annual)</cbc:Name>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>15</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="SAR">2200.00</cbc:PriceAmount>
    </cac:Price>
  </cac:InvoiceLine>
</Invoice>

What this template emits

A UBL 2.1 invoice conformant to ZATCA Phase 2 standards. The invoice carries a bilingual visual leg (Arabic on the left, English on the right) and a structured XML leg suitable for submission to the ZATCA Fatoora platform.

Phase 2 added three integration requirements on top of Phase 1's QR-only mandate:

  1. Embedded UBL 2.1 XML with ZATCA-specific extensions for the profile, invoice type, and additional document references.
  2. A cryptographic stamp generated against a ZATCA-issued certificate, linking the invoice to the issuer's tax registration.
  3. A QR code containing TLV-encoded data: seller name, VAT registration, invoice timestamp, total, VAT amount, the XML hash, and the digital signature.

This template's XML emitter handles items 1 and 3 (TLV placeholder). The cryptographic stamp requires a private key issued by ZATCA's Compliance Portal and is generated at signing time on the Pro tier.

Arabic rendering moat

ZATCA expects the registered name in Arabic on the structured XML. Most PDF generators built on DOMPDF or TCPDF cannot render Arabic right-to-left correctly without third-party shaping libraries; characters appear isolated or in the wrong order. LightningPDF's Chromium engine renders Arabic the same way Chrome does, with proper ligatures, contextual letter forms, and RTL text flow. No font configuration, no add-on.

The English trading name and the Arabic registered name typically appear on the same invoice. The bilingual layout puts them in adjacent columns.

Validation status

The full ZATCA validator ships only in the Fatoora SDK and requires registered-taxpayer access to the portal. On 2026-06-03 we ran a structural conformance check against the 11 ZATCA-required elements (ProfileID clearance:1.0, UUID, IssueDate, IssueTime, InvoiceTypeCode with @name, TaxCurrencyCode SAR, AdditionalDocumentReference entries for ICV / PIH / QR, bilingual Arabic + English content). All 11 checks pass. Result file: test-results/validators/zatca/structural-checks.json.

The full Schematron run will be added once we have Fatoora portal access; at that point we will also wire the cryptographic stamp signing with a real certificate (currently a placeholder in the XML).

Submission flow

For B2B (standard) invoices on the clearance profile:

  1. The issuer generates the invoice locally.
  2. The XML is signed with the issuer's certificate.
  3. The signed XML is submitted to ZATCA's Fatoora platform.
  4. Fatoora returns a cleared invoice hash; the issuer's PDF carries this hash in the QR code.
  5. The PDF is delivered to the buyer; the buyer's accounting software reads the QR for verification.

For B2C (simplified) invoices on the reporting profile, the QR code is computed locally and the invoice is reported to Fatoora within 24 hours rather than cleared in real time.

Frequently asked questions

Does this template handle Phase 1 (the QR-only requirement) too?

Yes. Phase 1 only required the QR code; Phase 2 added the embedded XML and cryptographic stamp. The template emits both. Receivers in Phase 1-only mode can ignore the XML attachment.

Can I integrate without a Fatoora certificate?

The XML is emittable without a certificate; the cryptographic stamp is not. For testing, ZATCA's sandbox issues test certificates. Production submission requires the real Compliance Portal credentials.

What about other GCC countries?

The UAE Federal Tax Authority published a separate e-invoicing framework expected to enter mandatory operation across 2026-2027. The UAE PINT (Peppol International Invoice) profile shares the EN 16931 base; a UAE-specific template will follow the same emitter pattern.