BR-KSA-39: Seller VAT registration number (BT-31) is required

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Error: the invoice is rejectedAll invoicesFields: BT-31

The seller party must have a cac:PartyTaxScheme with a non-empty cbc:CompanyID (BT-31) and a cac:TaxScheme whose cbc:ID is 'VAT'.

How to fix it

Add <cac:PartyTaxScheme><cbc:CompanyID>…</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme> under cac:AccountingSupplierParty/cac:Party.

ZATCA's official text

[BR-KSA-39]-The invoice must contain the seller VAT registration number or seller group VAT registration number (BT-31).
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

not(((cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) != '' and (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme[normalize-space(cbc:ID) = 'VAT'])))

Related rules

Validate your invoice against ZATCA's rules

Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.

Validate an invoice or try Matheel