# Advance payment xml

**URL:** <https://zatca1.discourse.group/t/advance-payment-xml/6239>\
**Category:** General\
**Created:** [March 11, 2025, 1:03pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239 "2025-03-11T13:03:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![M.serhan](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@M.serhan](https://zatca1.discourse.group/u/M.serhan)\
**Post date:** [March 11, 2025, 1:03pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/1 "2025-03-11T13:03:14Z")

</div>

we encountered an error (“Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129)”) while attempting to send the advance payment information in the ZATCA XML.

cac:InvoiceLine  
cbc:ID2\</cbc:ID\>  
\<cbc:InvoicedQuantity unitCode=“PCE”\>0\</cbc:InvoicedQuantity\>  
\<cbc:LineExtensionAmount currencyID=“SAR”\>0\</cbc:LineExtensionAmount\>  
cac:DocumentReference  
cbc:IDM-1865123454-33467-0037\</cbc:ID\>  
cbc:UUID3a95ad85-e755-4dac-1975-08dd5a3ccf52\</cbc:UUID\>  
cbc:IssueDate2025-03-03\</cbc:IssueDate\>  
cbc:IssueTime13:18:58\</cbc:IssueTime\>  
cbc:DocumentTypeCode386\</cbc:DocumentTypeCode\>  
\</cac:DocumentReference\>

and when change to be 1 ZATCA status returned as cleared

cac:InvoiceLine  
cbc:ID2\</cbc:ID\>  
\<cbc:InvoicedQuantity unitCode=“PCE”\>1\</cbc:InvoicedQuantity\>

please note that the invoice Quantity should remain 0, as outlined in the ZATCA document.  
What is the appropriate procedure and is it acceptable to keep the quantity 1?​

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [March 11, 2025, 7:48pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/2 "2025-03-11T19:48:45Z")

</div>

Dear @M.serhan

Thanks for reaching out,

Could you please elaborate further on your statement, “the invoice quantity should remain 0”? I would appreciate understanding the reasoning behind this, please note that InvoicedQuantity tag is represent the quantity of the soled item.

Thanks,  
Ibrahem Daoud.

---

<div class="post-metadata">

**Author:** ![M.serhan](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@M.serhan](https://zatca1.discourse.group/u/M.serhan)\
**Post date:** [March 13, 2025, 12:14pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/3 "2025-03-13T12:14:50Z")

</div>

Dear @idaoud  
this invoice line for advance payment not for sold item  
and as ZATCA document mention in this invoice line (Advance payment ) the Qty set 0

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/zatca1/original/1X/a6cb3cd0f75d3e0051c3acf181109d85f7400d4d.png)

when sent the document to be cleared we facing an error (“Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129)”)  
but when change to be 1 the document cleared

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [March 13, 2025, 12:26pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/4 "2025-03-13T12:26:21Z")

</div>

Dear @M.serhan

Thanks for your response, Can I kindly ask you to share the XML for our investigation?

Additionally, Please refer to the following path in SDK  
SDK\Java\zatca-einvoicing-sdk-Java-238-R3.4.0\Data\Samples\Standard\Invoice\ Advance Payment adjustments with foreign currency invoice.xml  
Ensure that your XML comply with the sample XML.

Thanks,  
Ibrahem Daoud.

---

<div class="post-metadata">

**Author:** ![M.serhan](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@M.serhan](https://zatca1.discourse.group/u/M.serhan)\
**Post date:** [March 17, 2025, 9:03am UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/5 "2025-03-17T09:03:20Z")

</div>

@idaoud  
Thanks for your response.  
i send the XML was rejected by Email .  
[M.serhan@minerets.com](mailto:M.serhan@minerets.com)

---

<div class="post-metadata">

**Author:** ![mhaba](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mhaba](https://zatca1.discourse.group/u/mhaba)\
**Post date:** [August 20, 2025, 1:52pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/6 "2025-08-20T13:52:28Z")

</div>

Hey can you share the solution for this issue with me to.  
As facing it at my end to.

@idaoud @M.serhan

---

<div class="post-metadata">

**Author:** ![Ankit.K.Tiwari](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Ankit.K.Tiwari](https://zatca1.discourse.group/u/Ankit.K.Tiwari)\
**Post date:** [August 20, 2025, 2:00pm UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/7 "2025-08-20T14:00:37Z")

</div>

@mhaba @M.serhan thank you for highlighting this, it appears to be a bug returning a warning BR-22 when the value is precisely “0”. There is no warning when the value is “0.00”. It is unexpected behavior, this will be fixed going forward. For now, could you please use “0.00” in the value instead of “0”.

---

<div class="post-metadata">

**Author:** ![mhaba](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mhaba](https://zatca1.discourse.group/u/mhaba)\
**Post date:** [August 21, 2025, 9:25am UTC](https://zatca1.discourse.group/t/advance-payment-xml/6239/8 "2025-08-21T09:25:48Z")

</div>

Noted. Thanks for your prompt response.
