BR-KSA-37: Seller building number must be exactly 4 digits
The seller's address cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:BuildingNumber must match ^[0-9]{4}$: exactly four digits. A missing building number also fails this check.
How to fix it
Provide the seller building number as four digits, e.g. <cbc:BuildingNumber>2322</cbc:BuildingNumber>.
ZATCA's official text
[BR-KSA-37]-The seller address building number must contain 4 digits.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(matches(cac:PostalAddress/cbc:BuildingNumber, '^[0-9]{4}$'))
Related rules
- BR-KSA-34 · Invoice counter value (ICV, KSA-16) must contain only digits
- BR-KSA-35 · A supply end date (KSA-24) requires a supply date (KSA-5)
- BR-KSA-36 · Supply end date (KSA-24) must not be before supply date (KSA-5)
- 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