CRATEAPI

BR-CO-21

EN 16931 FATAL

This is a consistency rule: two or more amounts in the invoice must add up exactly, and in your file they don't. The validator recomputes the total from its parts and compares it with the value you declared.

How to fix it
  1. Recompute the amounts referenced in the rule text below and make them agree.
  2. Round each line and each total to 2 decimals using the same rounding mode everywhere (banker's rounding is a common source of 1-cent mismatches).
  3. Never re-derive a declared total from scratch on the receiving side of your pipeline - compute it once, at the source, and carry it through.
Official rule text
Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both.

Developers also reach this page searching for an “invoice validation error”, an “e-invoice rejected” message, or how to fix a failed EN 16931 compliance check — it's the same issue, explained above.

Fix it faster

Paste your invoice XML in our free validator - every finding comes with its rule ID. Then generate, convert and render compliant invoices through one API.

Related rules