BR-KSA-30: Signature method must be the enveloped XAdES URN
For simplified invoices and their notes (@name starting '02'), on every non-PIH attachment (in practice the QR attachment): the attachment's cbc:EmbeddedDocumentBinaryObject must be non-empty and cac:Signature/cbc:SignatureMethod must equal 'urn:oasis:names:specification:ubl:dsig:enveloped:xades'. Although the official text says every document, standard invoices are not checked.
How to fix it
In cac:Signature set <cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod>, and make sure the QR attachment is not empty.
ZATCA's official text
[BR-KSA-30]-The document cryptographic stamp (KSA-15) must contain the exact "urn:oasis:names:specification:ubl:dsig:enveloped:xades" value for signature method.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(exists(cbc:EmbeddedDocumentBinaryObject) and (cbc:EmbeddedDocumentBinaryObject) != '' and (//cac:Signature/cbc:SignatureMethod) = 'urn:oasis:names:specification:ubl:dsig:enveloped:xades')
Related rules
- BR-KSA-28 · Signature information ID must be ...ubl:signature:1
- BR-KSA-29 · Signature ID and referenced signature ID must be ...signature:Invoice
- BR-KSA-60 · Simplified invoices must include the cac:Signature block (KSA-15)
- BR-KSA-27 · Simplified invoices must carry a QR code (KSA-14)
- BR-KSA-31 · Simplified invoices cannot be self-billed (KSA-2 position 7 = 0)
- BR-KSA-33 · Every invoice needs an invoice counter value (ICV, KSA-16)
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