E-invoice validation rules, explained

The 103 business rules our validator runs on XRechnung, ZUGFeRD, Factur-X and other EN 16931 invoices: what each means, where the field is in the XML, and the fix.

XRechnung rules (BR-DE)

RuleWhat it requires
BR-DE-1An XRechnung must contain payment instructions.
BR-DE-2An XRechnung must contain the seller contact group.
BR-DE-3The seller's city must be given.
BR-DE-4The seller's post code must be given.
BR-DE-5The seller's contact point (a name or department) must be given.
BR-DE-6The seller's contact telephone number must be given.
BR-DE-7The seller's contact e-mail address must be given.
BR-DE-8The buyer's city must be given.
BR-DE-9The buyer's post code must be given.
BR-DE-14Each VAT breakdown row must give its VAT rate.
BR-DE-15The buyer reference must be given.
BR-DE-16When a VAT category S, Z, E, AE, K, G, L or M is used, the seller's VAT identifier or tax registration number must be given.
BR-DE-17The invoice type code should be one of 326, 380, 384, 389, 381, 875, 876 or 877.
BR-DE-19With payment means code 58 (SEPA credit transfer) the payment account should be a correct IBAN.
BR-DE-21The specification identifier should be the XRechnung identifier.
BR-DE-23-aWhen the payment means code is a credit transfer (30 or 58), the credit transfer details must be given.
BR-DE-27The seller's telephone number should contain at least three digits.
BR-DE-28The seller's e-mail address should have exactly one @ with at least two characters on each side.

Mandatory fields (BR)

RuleWhat it requires
BR-01An invoice must have a specification identifier.
BR-02An invoice must have an invoice number.
BR-03An invoice must have an issue date.
BR-04An invoice must have an invoice type code.
BR-05An invoice must have a currency code.
BR-06An invoice must contain the seller's name.
BR-07An invoice must contain the buyer's name.
BR-08An invoice must contain the seller's postal address.
BR-09The seller's postal address must contain a country code.
BR-10An invoice must contain the buyer's postal address.
BR-11The buyer's postal address must contain a country code.
BR-12An invoice must state the sum of the invoice line net amounts.
BR-13An invoice must state the total amount without VAT.
BR-14An invoice must state the total amount with VAT.
BR-15An invoice must state the amount due for payment.
BR-16An invoice must have at least one invoice line.
BR-21Each invoice line must have a line identifier.
BR-22Each invoice line must have an invoiced quantity.
BR-23Each invoice line must have a unit of measure code for its quantity.
BR-24Each invoice line must have a line net amount.
BR-25Each invoice line must contain the item name.
BR-26Each invoice line must contain the item net price.
BR-27The item net price must not be negative.
BR-45Each VAT breakdown row must have a taxable amount.
BR-46Each VAT breakdown row must have a VAT amount.
BR-47Each VAT breakdown row must have a VAT category code.
BR-48Each VAT breakdown row must have a VAT rate, except when the invoice is not subject to VAT.
BR-61When the payment means is a credit transfer (codes 30 and 58), the payment account identifier must be present.
BR-62The seller's electronic address must have a scheme identifier.
BR-63The buyer's electronic address must have a scheme identifier.

Sums and consistency (BR-CO)

RuleWhat it requires
BR-CO-04Each invoice line must have a VAT category code.
BR-CO-09A VAT identifier must start with the two-letter country code of the member state that issued it (EL for Greece).
BR-CO-10The sum of invoice line net amounts must equal the total of the line net amounts.
BR-CO-13The total without VAT must equal the line total minus document allowances plus document charges.
BR-CO-14The total VAT amount must equal the sum of the VAT amounts of the VAT breakdown rows.
BR-CO-15The total with VAT must equal the total without VAT plus the total VAT amount.
BR-CO-16The amount due must equal the total with VAT minus the paid amount plus the rounding amount.
BR-CO-17The VAT amount of a breakdown row must equal its taxable amount times its rate, rounded to two decimals.
BR-CO-18An invoice must have at least one VAT breakdown row.
BR-CO-25When the amount due is positive, the payment due date or the payment terms must be present.
BR-CO-26The seller must be identifiable: a seller identifier, a legal registration identifier or a VAT identifier must be present.

VAT categories (BR-S, BR-Z, BR-E, BR-AE, BR-IC, BR-G)

RuleWhat it requires
BR-S-01An invoice with a line in VAT category "Standard rated" (S) must have at least one VAT breakdown row for that category.
BR-S-02An invoice with a "Standard rated" line must state the seller's VAT identifier or tax registration number.
BR-S-05On a standard-rated line the VAT rate must be greater than zero.
BR-S-08For each standard VAT rate, the taxable amount in the VAT breakdown must equal the sum of the net amounts of the lines with that rate.
BR-S-09The VAT amount of a standard-rated breakdown row must equal its taxable amount times its rate.
BR-S-10A "Standard rated" VAT breakdown row must not give a VAT exemption reason.
BR-Z-01An invoice with a line in VAT category "Zero rated" (Z) must have exactly one VAT breakdown row for that category.
BR-Z-02An invoice with a "Zero rated" line must state the seller's VAT identifier or tax registration number.
BR-Z-05On a "Zero rated" line the VAT rate must be 0.
BR-Z-08The taxable amount of the "Zero rated" VAT breakdown row must equal the sum of the net amounts of its lines.
BR-Z-09The VAT amount of the "Zero rated" breakdown row must be 0.
BR-Z-10A "Zero rated" VAT breakdown row must not give a VAT exemption reason.
BR-E-01An invoice with a line in VAT category "Exempt from VAT" (E) must have exactly one VAT breakdown row for that category.
BR-E-02An invoice with a "Exempt from VAT" line must state the seller's VAT identifier or tax registration number.
BR-E-05On a "Exempt from VAT" line the VAT rate must be 0.
BR-E-08The taxable amount of the "Exempt from VAT" VAT breakdown row must equal the sum of the net amounts of its lines.
BR-E-09The VAT amount of the "Exempt from VAT" breakdown row must be 0.
BR-E-10A "Exempt from VAT" VAT breakdown row must give a VAT exemption reason (text or code).
BR-AE-01An invoice with a line in VAT category "Reverse charge" (AE) must have exactly one VAT breakdown row for that category.
BR-AE-02An invoice with a "Reverse charge" line must state the seller's VAT identifier or tax registration number, and the buyer's VAT identifier.
BR-AE-05On a "Reverse charge" line the VAT rate must be 0.
BR-AE-08The taxable amount of the "Reverse charge" VAT breakdown row must equal the sum of the net amounts of its lines.
BR-AE-09The VAT amount of the "Reverse charge" breakdown row must be 0.
BR-AE-10A "Reverse charge" VAT breakdown row must give a VAT exemption reason (text or code).
BR-IC-01An invoice with a line in VAT category "Intra-community supply" (K) must have exactly one VAT breakdown row for that category.
BR-IC-02An invoice with a "Intra-community supply" line must state the seller's VAT identifier or tax registration number, and the buyer's VAT identifier.
BR-IC-05On a "Intra-community supply" line the VAT rate must be 0.
BR-IC-08The taxable amount of the "Intra-community supply" VAT breakdown row must equal the sum of the net amounts of its lines.
BR-IC-09The VAT amount of the "Intra-community supply" breakdown row must be 0.
BR-IC-10A "Intra-community supply" VAT breakdown row must give a VAT exemption reason (text or code).
BR-G-01An invoice with a line in VAT category "Export outside the EU" (G) must have exactly one VAT breakdown row for that category.
BR-G-02An invoice with a "Export outside the EU" line must state the seller's VAT identifier or tax registration number.
BR-G-05On a "Export outside the EU" line the VAT rate must be 0.
BR-G-08The taxable amount of the "Export outside the EU" VAT breakdown row must equal the sum of the net amounts of its lines.
BR-G-09The VAT amount of the "Export outside the EU" breakdown row must be 0.
BR-G-10A "Export outside the EU" VAT breakdown row must give a VAT exemption reason (text or code).

Decimals (BR-DEC)

RuleWhat it requires
BR-DEC-09The sum of line net amounts may have at most 2 decimals.
BR-DEC-12The total without VAT may have at most 2 decimals.
BR-DEC-13The total VAT amount may have at most 2 decimals.
BR-DEC-14The total with VAT may have at most 2 decimals.
BR-DEC-18The amount due may have at most 2 decimals.
BR-DEC-19A VAT breakdown taxable amount may have at most 2 decimals.
BR-DEC-20A VAT breakdown VAT amount may have at most 2 decimals.
BR-DEC-23A line net amount may have at most 2 decimals.

This is a subset of the two standards: the rules a plain invoice with lines, VAT and a bank transfer can break. Rules about allowances and charges, attachments, card and direct-debit payments are not run.