Codewerk.
Get a quote
Home/Blog/Tax calculation in B2B commerce: VAT, reverse charge and OSS

Tax calculation in B2B commerce: VAT, reverse charge and OSS

Get tax wrong and you do not get a bug report — you get an audit. The rules a B2B shop must encode, in plain language.

Photo: free stock photography (Unsplash licence) — see imprint

The three questions that decide the rate

Where are you established, where does the customer receive the goods, and is the customer a business with a valid VAT ID? Almost every B2B tax rule in the EU falls out of those three answers. Encode them explicitly instead of hard-coding 19%.

Validate the VAT ID, and store the proof

Reverse charge only applies with a valid VAT ID at the time of sale. Validate against VIES, and store the timestamped result with the order. When the auditor arrives two years later, that stored proof is the entire difference between a clean answer and a bill.

Rounding is a legal question, not a maths one

Rounding per line item versus per invoice total produces different results, and your ERP and your shop must agree on which. A one-cent difference across 10,000 invoices is not a rounding error to a tax office — it is a discrepancy.

Never let the shop be clever

Tax logic belongs in one place, ideally the ERP or a dedicated tax service, with the shop displaying what it is told. Two systems independently calculating tax will drift apart, and you will discover it in an audit rather than a test.

Key takeaways
  • Establishment, destination, VAT ID — encode all three.
  • Store timestamped VIES validation with the order.
  • One system owns tax. The shop only displays it.

We do this for a living — Shopware, Node.js, React, ERP integration and automation for B2B.

Talk to an engineer

// Keep reading

Related articles