From 1 January 2027, German businesses with a turnover above 800,000 euros must send e-invoices to other businesses, and from 2028 all of them must. Invoices to public buyers already have to be XRechnung. If your Laravel app bills German customers, it will soon write XML that the receiver checks against the official rules before anyone reads it, and an invoice that fails goes back to you.
A library such as horstoeko/zugferd writes a well-formed XRechnung from what you give it. Whether the result passes depends on that data: an empty field in your database becomes an invoice the rules reject. The library can't see that, but your tests can. This post sets it up in a few minutes: write the invoice in a test, send it to the same rules the receiver uses, and fail the build when one breaks.
Everything below was run for this post.…