Free test data for Italian e-invoices (FatturaPA), with 13 broken ones on purpose
A while ago I started looking at Italian electronic invoices (FatturaPA) and needed test files. It turned out to be harder than I expected. Real invoices are out. They're full of names, tax codes and IBANs, so you can't just drop them in a repo or a CI job. Writing the XML by hand works for two or three files, but then you're only testing the cases you already had in mind. So I wrote a generator,…
Italian electronic invoices, known as FatturaPA, often contain sensitive information such as names, tax codes, and IBANs, making them unsuitable for public distribution. A researcher has created a generator to produce a sample of both valid and broken invoices, with 36 valid invoices and 13 containing intentional errors. While the XSD schema is used to verify the structure of FatturaPA invoices, it does not check for arithmetic or tax rule compliance.
The issues covered in the sample include mismatches between the total and amount due, incorrect VAT rates, wrong line totals, and non-existent Natura codes. The dataset, available on Hugging Face and GitHub, provides the full XML files along with their expected values, allowing for easy testing and comparison. The generator is available on Apify for those needing larger datasets or specific scenarios.
Rewritten by urgent.news; may contain errors — check the original. How we use AI.
Source: dev.to