BR-KSA-67: Saudi buyer postal code (BT-53) must be 5 digits
When the buyer country code (BT-55) is 'SA', the buyer's cac:PostalAddress/cbc:PostalZone (BT-53) must match ^[0-9]{5}$. The check only runs on standard tax invoices and their notes (@name starting '01'), which the official text does not state.
How to fix it
Provide the buyer postal code as five digits, e.g. <cbc:PostalZone>12345</cbc:PostalZone> under cac:AccountingCustomerParty/cac:Party/cac:PostalAddress.
ZATCA's official text
[BR-KSA-67]-If the buyer country code (BT-55) is "SA", then the Buyer postal code(BT-53) must be 5 digits.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode) = 'SA' and not(matches(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:PostalZone, '^[0-9]{5}$'))
Related rules
- BR-KSA-10 · Standard invoices need buyer street, city and country code
- BR-KSA-63 · Saudi buyer needs a full national address on standard invoices
- BR-KSA-61 · Every invoice needs the previous invoice hash (PIH, KSA-13)
- BR-KSA-66 · Seller postal code (BT-38) must be exactly 5 digits
- BR-KSA-68 · Every invoice needs a tax currency code (BT-6)
- BR-KSA-69 · Zero-rated (Z) VAT breakdown needs a reason code (BT-121)
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