Who owns what between the tax engine and the e-invoicing layer

Tax determination and e-invoicing are different layers, often from different vendors and owned by different teams. Projects break at the seam, where the engine’s result has to become coded tax data on a structured invoice. Each side needs a named owner for its part of that hand-off.

By Herb Park, Clarent Technologies

As e-invoicing mandates spread, many companies end up with two specialist systems touching every invoice: a tax engine that calculates tax, and an e-invoicing platform (an ERP compliance module, a network provider or both) that turns the invoice into the required format and delivers it. Each is well understood on its own. The trouble is the handoff.

Drawing the lines

ResponsibilityTax engineE-invoicing layerERP
Decide taxability, rate and jurisdictionOwnsNever recalculatesSupplies facts
Decide VAT treatment (exempt, zero-rated, reverse charge)OwnsRepresents as codesSupplies facts
Tax amounts on the legal invoiceCalculatesMust match exactlyOwns the posted document
Invoice format and syntax (UBL, CII, local XML)No roleOwnsSupplies data
Business rule validation (totals, mandatory fields)No roleOwnsFixes source data
Buyer and seller identifiersUses someValidatesOwns in master data
Transmission, clearance, statusNo roleOwnsStores status
Legal wording and exemption reasonsProvides reason or ruleMaps to code or textPrints or passes
The hand-off between the engine and the invoice sits at the mapping step The same responsibilities in the order they happen on one invoice. Step 4 is where the engine's answer has to become invoice codes.
  • 1. ERP: Send transaction facts
  • 2. Tax engine: Decide treatment, rate, amount
  • 3. ERP: Post the document
  • 4. E-invoicing layer: Map result to category and reason codes
  • 5. E-invoicing layer: Validate totals and mandatory fields
  • 6. Network or authority: Clear or deliver, return status
  • 7. ERP: Store status

The seam: coded tax data

A structured invoice does not just carry a tax amount. Under EN 16931-based formats, each tax breakdown carries a VAT category code, a rate, a taxable amount and, for exemptions, an exemption reason code or text. Local formats have equivalents. Those codes must be derived from what the engine decided. If the engine returns "exempt" but nobody has defined which category and reason code that becomes for this country, the invoice either fails validation or, worse, passes with the wrong legal basis.

The fix is a deliberately owned mapping table: for each engine outcome (by country and scenario), which invoice category code, exemption reason and invoice note apply. Tax owns its content; the e-invoicing team implements it. Review it whenever a new country or scenario is added.

The mapping table turns each engine outcome into a category code and a reason A mapping table of the kind described above (illustrative, using EN 16931 style category codes). The row to worry about is the engine outcome nobody has mapped yet.
  • Country: DE; Engine outcome: Standard rated; Engine reason code: STD; Category code: S; Exemption reason: (none)
  • Country: DE; Engine outcome: Intra-community supply; Engine reason code: IC_SUPPLY; Category code: K; Exemption reason: VATEX-EU-IC
  • Country: DE; Engine outcome: Reverse charge; Engine reason code: RC_SERVICE; Category code: AE; Exemption reason: VATEX-EU-AE
  • Country: DE; Engine outcome: Export; Engine reason code: EXPORT; Category code: G; Exemption reason: VATEX-EU-G
  • Country: DE; Engine outcome: Exempt; Engine reason code: EX_FINANCE; Category code: (not mapped); Exemption reason: (not mapped)
  • 1 engine outcome has no invoice code
  • (1) The key is a stable reason code from the engine. A zero rate alone cannot tell this row from the two below it.
  • (2) An unmapped outcome fails validation, or goes out under a default code with the wrong legal basis. Tax decides this row and the e-invoicing team builds it.

Rounding and totals

ERPs and engines commonly calculate and round tax per line. E-invoice standards typically validate tax totals per category at document level. The two approaches can differ by a cent or more on long invoices, and validation rules reject the mismatch. Decide early how the difference is handled, test long invoices with many lines and mixed rates, and keep the posted document as the single source of truth for amounts.

Rounding each line and rounding the category total give different tax A three-line invoice at 20% (illustrative amounts). Each line rounds up by a fraction of a cent, and the sum no longer equals the tax on the category total.
  • Row: Line 1; Net: 10.33; Tax at 20%, unrounded: 2.066; Tax, rounded: 2.07
  • Row: Line 2; Net: 10.33; Tax at 20%, unrounded: 2.066; Tax, rounded: 2.07
  • Row: Line 3; Net: 10.33; Tax at 20%, unrounded: 2.066; Tax, rounded: 2.07
  • Row: Sum of line tax (ERP and engine); Net: 30.99; Tax at 20%, unrounded: ; Tax, rounded: 6.21
  • Row: Category total (e-invoice rule); Net: 30.99; Tax at 20%, unrounded: 6.198; Tax, rounded: 6.20
  • Validation: tax total 6.21 does not match category calculation 6.20
  • (1) This is the amount on the posted document, so it is the amount the e-invoice has to carry.
  • (2) This is what the validation rule expects. One cent apart is enough for a rejection.

Master data decides your rejection rate

Rejections are visible in the customer master before any invoice is sent A customer record seen through the e-invoicing checklist above (illustrative). Two gaps on this one record would reject every invoice sent to this buyer.
  • Street: Industriestrasse 12
  • City: (blank)
  • Postal code: (blank)
  • Country: DE
  • Address line (free text): Industriestr. 12, 70565 Stuttgart
  • VAT registration number: DE123456789
  • Network participant ID: (blank)
  • PO reference required: Yes
  • 2 e-invoicing checks failed: structured address, network ID
  • (1) The address exists, but only as one free-text line. The format needs city and postal code in their own fields.
  • (2) Present and in the right field. It still needs to be validated, because a wrong number is rejected like a missing one.
  • (3) Where the country uses a network, an invoice cannot be routed without this identifier.

Operating model

Name one owner for the end-to-end invoice compliance outcome, even if two systems and teams deliver it. Give the tax team visibility of e-invoice rejections with reason codes; many of them are tax-data problems in disguise. And include e-invoice validation in the regression pack, so a tax configuration change that would break invoice formats is caught in testing.