# ZATCA cryptographic stamp and QR code checks Security Features Implementation Standards 1.1, SDK 3.4.6

Source: https://xmlvalid.com/rules/sets/sa-zatca-stamp

> 16 rules by xmlvalid, after ZATCA's Electronic Invoice Security Features Implementation Standards and the stamps of its SDK (MIT). Source: https://zatca.gov.sa/ar/E-Invoicing/SystemsDevelopers/Documents/20220624_ZATCA_Electronic_Invoice_Security_Features_Implementation_Standards.pdf

- [XV-SA-01](https://xmlvalid.com/rules/XV-SA-01.md) (error): The invoice hash in the signature (DigestValue of the invoiceSignedData reference, …) is not the hash of the invoice (…): the invoice changed after it was signed, or the hash was made over another form of it.
- [XV-SA-02](https://xmlvalid.com/rules/XV-SA-02.md) (error): The signature (ds:SignatureValue) does not verify with the public key of the certificate in the signature over the invoice hash it states.
- [XV-SA-03](https://xmlvalid.com/rules/XV-SA-03.md) (error): The certificate digest in the signed properties (xades:CertDigest, …) is not that of the certificate in the signature (…).
- [XV-SA-04](https://xmlvalid.com/rules/XV-SA-04.md) (error): The digest of the signed properties in the signature (…) is not that of xades:SignedProperties (…).
- [XV-SA-05](https://xmlvalid.com/rules/XV-SA-05.md) (error): The QR code can't be read: ….
- [XV-SA-06](https://xmlvalid.com/rules/XV-SA-06.md) (warning): The QR code is … characters long; ZATCA's standard allows up to 700.
- [XV-SA-07](https://xmlvalid.com/rules/XV-SA-07.md) (error): The QR code lacks tag …: it must carry tags 1 to 8….
- [XV-SA-08](https://xmlvalid.com/rules/XV-SA-08.md) (error): The seller's name in the QR code (tag 1, …) is not the seller's RegistrationName (…).
- [XV-SA-09](https://xmlvalid.com/rules/XV-SA-09.md) (error): The VAT number in the QR code (tag 2, …) is not the seller's (…).
- [XV-SA-10](https://xmlvalid.com/rules/XV-SA-10.md) (error): The time stamp in the QR code (tag 3, …) is not the invoice's issue date and time (…).
- [XV-SA-11](https://xmlvalid.com/rules/XV-SA-11.md) (error): The total with VAT in the QR code (tag 4, …) is neither the invoice's TaxInclusiveAmount (…) nor, after prepayments, its PayableAmount (…).
- [XV-SA-12](https://xmlvalid.com/rules/XV-SA-12.md) (error): The VAT total in the QR code (tag 5, …) is not the invoice's VAT total (…).
- [XV-SA-13](https://xmlvalid.com/rules/XV-SA-13.md) (error): The invoice hash in the QR code (tag 6, …) is not the hash of the invoice (…).
- [XV-SA-14](https://xmlvalid.com/rules/XV-SA-14.md) (error): The signature in the QR code (tag 7) is not the invoice's ds:SignatureValue.
- [XV-SA-15](https://xmlvalid.com/rules/XV-SA-15.md) (error): The public key in the QR code (tag 8) is not that of the certificate in the signature.
- [XV-SA-16](https://xmlvalid.com/rules/XV-SA-16.md) (error): The certificate signature in the QR code (tag 9) is not that of the certificate in the signature.
