BR-KSA-67: Saudi buyer postal code (BT-53) must be 5 digits

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

Warning: accepted with a warningStandard tax invoices (B2B)Fields: BT-55, BT-53

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

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