# id='xadesSignedProperties

**URL:** <https://zatca1.discourse.group/t/id-xadessignedproperties/9517>\
**Category:** Signing process\
**Created:** [January 6, 2026, 3:13pm UTC](https://zatca1.discourse.group/t/id-xadessignedproperties/9517 "2026-01-06T15:13:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali00032](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Ali00032](https://zatca1.discourse.group/u/Ali00032)\
**Post date:** [January 6, 2026, 3:13pm UTC](https://zatca1.discourse.group/t/id-xadessignedproperties/9517/1 "2026-01-06T15:13:01Z")

</div>

Dear Support Team,

I am facing a **ZATCA Phase 2 e-invoicing validation issue** related to **XML digital signature and signed properties hashing** , and I need guidance on how to correct it.

### Summary of the Issue

- Invoice XML is generated correctly and **passes XSD, EN, KSA, and QR validations**

- The issue occurs **only at the signature level**

- ZATCA API and Fatoora SDK both report **invalid SignedProperties hashing**

- As a result, **PIH validation also fails**

### ZATCA API Error

From ZATCA API response:

```auto
Invalid signed properties hashing, SignedProperties with id='xadesSignedProperties'

```

### Fatoora SDK Validation Result (Java SDK 3.4.8)

When validating the same XML using:

```auto
fatoora generate -invoice 311218730900003_20260106_9.xml -validate

```

I receive the following errors:

```auto
[SIGNATURE] validation result : FAILED
CODE : xadesSignedPropertiesDigestValue
MESSAGE : wrong xadesSignedPropertiesDigestValue

CODE : signatureValue
MESSAGE : wrong signature Value

[PIH] validation result : FAILED
CODE : KSA-13
MESSAGE : PIH is inValid

```

### What Is Working Correctly

- XML structure (UBL 2.1) ✔

- Invoice data and totals ✔

- QR code generation ✔

- Certificate is loaded and used ✔

- Invoice hash is generated ✔

### Where the Problem Seems to Be

Based on the errors, the problem appears to be related to **XAdES signing** , specifically:

1. **Canonicalization of `<xades:SignedProperties>`**

2. **Digest calculation for SignedProperties**

3. **Reference URI or ID mismatch**

4. **SignatureValue calculated over incorrect canonical data**

5. **PIH calculated using an incorrect final invoice hash**

Because the SignedProperties digest is wrong, the **signature becomes invalid** , and consequently the **PIH hash also fails validation**.

### What I Need Help With

I would appreciate guidance on the **correct method to generate and sign XAdES SignedProperties** , specifically:

- Correct canonicalization method required by ZATCA (C14N type)

- Exact structure and required attributes for `<xades:SignedProperties>`

- How to correctly calculate:

- Common mistakes to avoid when signing invoices programmatically

If possible, a **sample reference implementation** or **step-by-step signing flow** would be extremely helpful.

### Environment Details

- Invoice Type: **B2C (Simplified)**

- SDK Used for Validation: **ZATCA Fatoora Java SDK 3.4.8**

- Implementation Language: **PHP**

- OS: \*\*Windows (XAMPP)

My integration date is limited plz reponse as soon as possible

Thank you for your time and support. I am very close to completion and only need help correcting the **signature and signed properties hashing** to become fully compliant.

Best regards
