How to Fix KoSIT Error BR-CO-16: DuePayableAmount Mismatch in Header Summation
KoSIT 1.6.3 rejects invoices where DuePayableAmount (BT-115) does not match the formula: GrandTotalAmount (BT-112) - TotalPrepaidAmount (BT-113) + RoundingAmount (BT-114). Fix by recalculating BT-115 to match this formula.
1. Why KoSIT Validator v1.6.3 Rejects This Invoice
BR-CO-16 enforces that the amount due for payment (BT-115) must be calculated correctly from the invoice total with VAT (BT-112), minus any prepaid amount (BT-113), plus rounding (BT-114). The official XPath test ensures this formula is applied in both CII and UBL contexts. If the values do not align, the invoice is rejected as non-compliant with EN 16931.
//ram:SpecifiedTradeSettlementHeaderMonetarySummation(xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1]) - xs:decimal(ram:TotalPrepaidAmount[1]) + xs:decimal(ram:RoundingAmount[1])) or ((xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1]) + xs:decimal(ram:RoundingAmount[1])) and not(ram:TotalPrepaidAmount)) or ((xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1]) - xs:decimal(ram:TotalPrepaidAmount[1])) and not(ram:RoundingAmount)) or ((xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1])) and not(ram:TotalPrepaidAmount) and not(ram:RoundingAmount))cac:LegalMonetaryTotal2. KoSIT-Verified XML Example: Broken vs. Fixed
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>200.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">38.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>238.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>100.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>238.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>200.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">38.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>238.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>100.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>138.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
The broken XML has a DuePayableAmount of 238.00, but with a TotalPrepaidAmount of 100.00, the correct value should be 138.00. The fixed XML correctly sets DuePayableAmount to 138.00, aligning with the formula BT-115 = BT-112 - BT-113 + BT-114, and passes KoSIT validation.
3. Step-by-Step Fix Checklist
- Step 1: Inspect the <ram:DuePayableAmount> element in <ram:SpecifiedTradeSettlementHeaderMonetarySummation>.
- Step 2: Recalculate BT-115 using the formula: GrandTotalAmount (BT-112) - TotalPrepaidAmount (BT-113) + RoundingAmount (BT-114).
- Step 3: Re-validate the invoice with Beleq's free KoSIT v1.6.3 validator to confirm BR-CO-16 compliance.
4. Common Shopify Store & DATEV Workflow Trigger
In a German Shopify B2B context, applying Store Credit as a discount instead of mapping it to TotalPrepaidAmount (BT-113) causes BR-CO-16 errors. Beleq helps by ensuring that Shopify Store Credit is correctly mapped to BT-113 and that DuePayableAmount is recalculated accordingly, preventing DATEV import errors and ensuring EN 16931 compliance.
5. Frequently Asked Questions
Can I ignore BR-CO-16 if the invoice looks correct visually?
No. KoSIT validation is mandatory for legal compliance in Germany. Even if the invoice appears correct visually, BR-CO-16 errors will cause rejection by DATEV and tax authorities.
Does this rule apply to ZUGFeRD 2.3 and XRechnung 3.0 the same way?
Yes. BR-CO-16 applies to both ZUGFeRD 2.3 (Factur-X) and XRechnung 3.0. The formula and XPath test are identical across both profiles.
Related KoSIT Error Codes
Check your hybrid ZUGFeRD PDF or XRechnung XML in under 1 second against the official German KoSIT Validator v1.6.3 — 100% RAM-based on Frankfurt servers with zero retention and no registration.
Open Free KoSIT v1.6.3 Validator → See Beleq for Shopify