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
| Responsibility | Tax engine | E-invoicing layer | ERP |
|---|---|---|---|
| Decide taxability, rate and jurisdiction | Owns | Never recalculates | Supplies facts |
| Decide VAT treatment (exempt, zero-rated, reverse charge) | Owns | Represents as codes | Supplies facts |
| Tax amounts on the legal invoice | Calculates | Must match exactly | Owns the posted document |
| Invoice format and syntax (UBL, CII, local XML) | No role | Owns | Supplies data |
| Business rule validation (totals, mandatory fields) | No role | Owns | Fixes source data |
| Buyer and seller identifiers | Uses some | Validates | Owns in master data |
| Transmission, clearance, status | No role | Owns | Stores status |
| Legal wording and exemption reasons | Provides reason or rule | Maps to code or text | Prints or passes |
- 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.
- 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.
- 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
- Buyer VAT or tax registration numbers, validated and stored in the right field.
- Network identifiers such as Peppol participant IDs, where the country uses a network.
- Complete, structured addresses (street, city, postal code, country code), not a single free-text line.
- Purchase order references required by public-sector or large buyers.
- Seller identifiers per legal entity and per country registration.
- 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.