Do I need a live VIES or HMRC call to get rates?
No. GET /rates/:countryCode and GET /calculate use bundled tables. checkRegistry=true on /validate is optional and talks to VIES (EU) or HMRC (GB/XI).
Bundled EU and UK rate tables, category-level price calculation, and format checks for VAT numbers. Live VIES or HMRC confirmation is optional.
This calls the live VAT API using bundled rates. Switch between /calculate and /rates. The demo does not hit VIES.
Loading VAT data...
Why VAT Validation and Rates API
29 country tables
Standard, reduced, super-reduced, parking, and zero rates for 27 EU members plus GB and XI.
Price calculation
GET /calculate returns vatRate, vatAmount to 2 decimal places, and totalIncludingVat.
Rate categories
standard, reduced, reduced2, superReduced, parking, and zero. Missing categories return null.
Number format checks
GET /validate applies country-specific patterns. Live VIES or HMRC is opt-in via checkRegistry.
Reverse charge hint
sellerCountryCode on /validate sets reverseChargeApplicable for EU B2B invoicing logic.
Catalog and batch
GET /catalog lists countries and categories. Batch validate and calculate handle up to 50 items.
/api/v1/vat-validation-and-rates
Calculate
VAT amount and inclusive total for amount + countryCode. Optional category.
Country rates
Bundled rate structure for one country. 404 when the code is not in the table.
All rates
Full 29-country table with standard, reduced, superReduced, parking, zero, and currency.
Validate VAT number
Format check. Optional checkRegistry and sellerCountryCode. Path form /validate/:vatNumber exists.
Catalog
Supported countries, rate categories, and endpoint inventory.
Service health
Status, service name, version, and timestamp.
Prometheus metrics
Request counts and duration histograms in Prometheus exposition format.
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | number | yes* | Positive amount for /calculate. |
| countryCode | string | yes* | 2-letter ISO code for /calculate or path param for /rates/:countryCode. |
| category | string | no | standard, reduced, reduced2, superReduced, parking, or zero. Default standard. |
| vatNumber | string | yes* | VAT number with country prefix, 4-20 chars, for /validate. |
| checkRegistry | boolean | no | Query VIES or HMRC. Default false. |
| sellerCountryCode | string | no | 2-letter seller country for reverse charge detection on /validate. |
Error reference
Joi failure or invalid country code before VAT processing.
VAT number fails the country-specific format pattern.
Missing or invalid gateway API key. Send x-api-key or api_key with every request.
Country not in the rates table, or unknown endpoint path.
More than 1000 requests in a 15-minute window.
Unexpected failure during an optional VIES or HMRC lookup.
Example error response
{
"success": false,
"error": "Rates not found for country",
"reason": "country-not-found",
"correlationId": "req_abc123"
}FAQ
No. GET /rates/:countryCode and GET /calculate use bundled tables. checkRegistry=true on /validate is optional and talks to VIES (EU) or HMRC (GB/XI).
29 codes: 27 EU members plus GB and XI (Northern Ireland). Unknown country codes on /rates or /calculate return 404.
Pass amount, countryCode, and optional category (standard, reduced, reduced2, superReduced, parking, zero). The response includes vatRate, vatAmount (2 dp), and totalIncludingVat.
When you send sellerCountryCode on /validate, the API sets reverseChargeApplicable from EU reverse-charge rules. It is null when either party is outside EU scope.
Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.
Bundled EU and UK tables, category-level calculation, and optional VAT number format checks without a required registry call.