How Draftbill works: rates, required fields and Peppol XML
Where Draftbill’s VAT rates and required-field checklists come from, how totals are rounded, how the PDF and the Peppol XML are produced, and what is not checked.
Diese Seite ist auf Englisch verfasst.
Tax rates
Each country’s rates are copied from the page of its tax authority, and the rate table in the source code names that page next to the rate. The country guides repeat the same sources. Rates were last checked on 15 October 2026. For EU countries the European Commission’s page on VAT rates is used as a cross-check.
Where a country applies different rates in different regions, only the main territory is listed. That covers Portugal’s Azores and Madeira, the Spanish Canary Islands, Ceuta and Melilla, Canadian provincial sales taxes and Indian special rates. Every line also offers an “Other rate” option so you can enter any rate, which Draftbill then prints as typed.
A rate is only listed when an official page states it. When a country’s current rate could not be confirmed, the country is left out. Eighteen countries are covered; the other EU member states are not offered yet.
Required fields
The checklist for each country is a list of fields with the provision that asks for it, such as § 14 Abs. 4 UStG in Germany or ML 17 kap. 24 § in Sweden. For EU countries the common base is Article 226 of the VAT Directive, and each country adds its own requirements on top: the SIREN and the payment terms in France, the date or period of supply in Austria, the UID of the recipient above EUR 10,000 in Austria.
Some requirements depend on the invoice. The exemption reason is only asked for when a line is exempt, the customer’s VAT number when a line is reverse charge, the tax amount in your national currency when the invoice is in another currency, and several thresholds apply only above an amount, as in Canada and Australia. A requirement with a condition that does not apply is not shown.
The checklist also raises warnings that do not block anything: a tax ID that does not match the usual national format, an IBAN that fails its checksum, an invoice number longer than the country allows, and a due date before the invoice date. Tax ID patterns check format only; Draftbill does not look numbers up in VIES or any other register.
Totals and rounding
Quantities and prices are read as exact decimals with up to six decimals, in dot or comma notation. A line total is quantity times unit price, rounded half away from zero to the currency’s minor unit (two decimals for most currencies, none for the yen). Lines are grouped by tax category and rate, the tax of each group is computed once on the group’s total and rounded the same way, and the invoice totals are the sums of the groups.
This follows the calculation rules of EN 16931, which is why the figures on the PDF and in the Peppol file always agree. For India the tax of each group is split into equal CGST and SGST halves when the supply is within a state, with any odd minor unit going to SGST, and shown as IGST when the supply is between states.
The preview is the document. The PDF button opens your browser’s print dialog, and a dedicated print stylesheet hides everything except the invoice and sets A4 paper with 14 mm margins. The browser renders text as text, so the PDF is sharp at any zoom and its text can be selected and searched. The print dialog’s file name is set to the invoice number.
Peppol BIS Billing 3.0 XML
The export writes a UBL 2.1 Invoice with the Peppol BIS Billing 3.0 customization and profile identifiers, document type 380, and the elements of the specification’s syntax binding in the order the UBL schema requires: parties with their electronic addresses, tax totals per category and rate, payment means, legal monetary total and invoice lines with classified tax categories. Optional elements that are empty are left out, because the specification forbids empty elements.
Before a file can be downloaded the invoice must pass a preflight check for the data the specification makes mandatory, and the generated document is checked structurally: every mandatory element path of the specification’s mandatory business terms must be present with a value, and no element may be empty. The same checks run as automated tests against a sample Swedish invoice and against invoices from other countries.
What is not checked
Draftbill does not run the Peppol schematron, the full rule set that access points use, and it does not validate against the UBL XSD in the browser. A file that passes Draftbill’s checks can therefore still be rejected for a rule it does not cover, and national add-ons such as the Swedish, Danish or German extensions are not applied. Send a file to your access point’s validator first.
The Peppol export is only offered where Peppol BIS Billing 3.0 is the working format: EU countries and the United Kingdom. It is not offered for the United States, Canada, India or Australia, whose e-invoicing arrangements differ; Australia uses a different Peppol customization.