BR-KSA-44: Buyer VAT number (BT-48): 15 digits, starting and ending with 3
Applies only when the buyer has a non-empty cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-48): it must be exactly 15 digits, with the first and last digit both '3'.
How to fix it
Either put the buyer's 15-digit VAT number in cac:PartyTaxScheme/cbc:CompanyID with no spaces or letters, or leave out cac:PartyTaxScheme/cbc:CompanyID if the buyer has no VAT number.
ZATCA's official text
[BR-KSA-44]-If it exists in the invoice,the buyer VAT registration number or buyer group VAT registration number (BT-48) must contain 15 digits. The first digit and the last digit is "3".
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
string-length(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) > 0 and not(exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) and matches(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, '^[0-9]{15}$') and starts-with(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, '3') and ends-with(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID, '3'))
Related rules
- BR-CUSTOM-VALIDATION-01 · Seller and buyer VAT numbers must not be the same
- BR-KSA-81 · Standard invoice without buyer VAT number needs another buyer ID
- BR-KSA-99 · Buyer VAT number must not be empty when the element is present
- BR-KSA-39 · Seller VAT registration number (BT-31) is required
- BR-KSA-40 · Seller VAT number (BT-31): 15 digits, starting and ending with 3
- BR-KSA-42 · Standard tax invoices and their notes need the buyer name (BT-44)
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