Alpha testing: all current functionality is free while VAT Engine is in active development

Calculate gross, net, and VAT

VAT calculation API

Send an amount, country, tax class, supply date, and price-inclusion context to receive a calculation built for repeatable system integration.

What this helps you do

Keep checkout and reporting arithmetic consistent while retaining the inputs needed to understand a result later.

  • Gross-inclusive and net-exclusive calculation paths.
  • Minor-unit arithmetic to avoid floating-point rounding errors.
  • Tax-class and recorded-date context returned with the calculation.
  • Optional transaction records for account-owned audit views.

How to use it well

Declare the amount basis

Tell the API whether the amount already includes VAT; this determines whether VAT is added or extracted.

Send money in minor units

Use integer cents or the currency’s minor unit in system integrations to avoid binary floating-point rounding drift.

Treat arithmetic and tax treatment separately

A correct gross/net calculation still depends on a reviewed country, rate, product classification, and date.

Extract VAT from a VAT-inclusive amount

Suppose a reviewed transaction uses a 19% rate and the customer pays €119.00 including VAT. The arithmetic gives €100.00 net and €19.00 VAT.

  1. Send 11900 minor units with price_includes_vat: true. For a net input, explicitly send false; do not omit the amount basis.
  2. Supply the transaction date so a retry or import does not silently use today’s date. An authenticated Idempotency-Key also requires an explicit date.
  3. Check the response and retain its calculation identifier. Reusing an idempotency key with a different request returns a conflict rather than overwriting the earlier calculation.
POST /v1/vat/calculate
{
  "country": "DE",
  "currency": "EUR",
  "tax_class_id": "standard",
  "gross_amount_minor": 11900,
  "price_includes_vat": true,
  "transaction_date": "2026-01-28"
}

This is an illustrative arithmetic example, not a determination that Germany’s standard rate applies to your supply. The API requires an authenticated full or calculate-only key; keep it on your server.

Check authentication, rounding, and response fields