Convert Stripe Invoice JSON to German XRechnung / ZUGFeRD EN 16931 CII XML (Zero Float Drift)
Standard Stripe PDFs are unstructured visual documents that fail Germany’s § 14 UStG B2B e-invoice mandate. FakturaLab converts Stripe integer cents using pure BigInt arithmetic into validated EN 16931 UN/CEFACT CII XML (ready for XRechnung 3.0 or downstream PDF/A-3 embedding — not a hybrid PDF/A-3 file directly).
Why This Error Happens
Naive Stripe-to-XML scripts divide integer cents by 100 using JavaScript IEEE-754 floats (causing 1-cent BR-CO-15 / BR-S-08 rounding drifts) and omit mandatory German XRechnung fields such as Seller Contact (BR-DE-2), Buyer Reference (BR-DE-15), and SEPA PaymentMeans with Mod-97 valid IBAN (BR-DE-1 / BR-DE-23).
German 2025–2028 § 14 UStG Regulatory Context
Under § 14 UStG, German B2B customers already demand structured EN 16931 invoices, and domestic issuers above €800,000 turnover must stop sending plain Stripe PDFs from 1 Jan 2027 (all B2B from 1 Jan 2028). Note: FakturaLab outputs pure validated EN 16931 CII XML (`factur-x.xml` / XRechnung 3.0 CII) in volatile RAM and does not produce hybrid PDF/A-3 files or replace GoBD 8-year invoice archiving (§ 147 AO).
Invalid XML (Rejected)
FAIL<!-- Anti-pattern: Naive float conversion (4900 + 3*1999 = 10897 cents = 108.97)
Truncated float VAT 20.71 instead of HALF_UP 20.70, missing BR-DE-2 & BR-DE-15 -->
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>108.97</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>108.97</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">20.71</ram:TaxTotalAmount> <!-- ERROR: 108.97 * 19% = 20.7043 -> 20.70 -->
<ram:GrandTotalAmount>129.67</ram:GrandTotalAmount> <!-- ERROR (BR-CO-15): 108.97 + 20.71 != 129.67 -->
<ram:DuePayableAmount>129.67</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Fixed EN 16931 XML (Compliant)
PASS<!-- Exact BigInt cents from Stripe JSON: 4900 + (3 * 1999) = 10897 -> 108.97 EUR -->
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>58</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>DE89370400440532013000</ram:IBANID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>20.70</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>108.97</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>108.97</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>108.97</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">20.70</ram:TaxTotalAmount>
<ram:GrandTotalAmount>129.67</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>129.67</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>0.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Step-by-Step Fix Checklist
- Keep Stripe minor-unit integers (e.g. 4900, 1999) strictly in BigInt cents — never convert through JavaScript Number floats.
- Attach German compliance metadata in Stripe Invoice metadata: seller_contact_name (BT-41), seller_contact_phone (BT-42), seller_contact_email (BT-43), buyer_reference (BT-10), and a Mod-97 verified seller_iban (BT-84).
- For already-paid Stripe invoices, set TotalPrepaidAmount (BT-113) = GrandTotalAmount (BT-112) and DuePayableAmount (BT-115) = 0.00 so BR-CO-16 reconciles.
- Send the validated EN 16931 CII XML directly as XRechnung 3.0 in Germany, or embed it as factur-x.xml into a PDF/A-3 container with your PDF pipeline if your client requests hybrid ZUGFeRD.
Frequently Asked Questions
Does FakturaLab output a hybrid ZUGFeRD PDF/A-3 or pure EN 16931 CII XML?
FakturaLab generates pure, 100% validated EN 16931 UN/CEFACT CII XML (supporting XRechnung 3.0 and ZUGFeRD 2.3 EN 16931 profiles). Our validator accepts and extracts hybrid ZUGFeRD PDF/A-3 uploads, while the generator focuses on deterministic CII XML output ready for direct XRechnung delivery or downstream PDF/A-3 embedding.
Does FakturaLab store my Stripe customer JSON or invoice data?
Never. Conversion and closed-loop validation execute strictly in volatile EU Frankfurt RAM with zero disk writes and Cache-Control: no-store.