# Let the API pick the default rate for BG (no explicit vat_rate)
curl -s -X POST "https://api.yeb.to/v1/vat" ^
-H "X-API-Key: YOUR_KEY" ^
-H "Content-Type: application/x-www-form-urlencoded" ^
--data "action=calculate&net=100&country_code=BG&vat_type=standard"
A practical guide to VAT Calculator API: how to calculate VAT from any combination
of net, gross, VAT amount or rate, how to leverage country profiles, and how to read both single-rate
and multi-rate scenarios in your billing or invoicing logic.
Last updated: 10 Jan 2026, 05:45
API Version: v1
Burst: 20 req/s
Latency: 2.6 ms
Cost:
0.001 credits/req
Instead of re-implementing VAT rules in every project, you send net / gross / VAT amount / rate
(any two are enough), plus optional country and VAT type. The API calculates the
missing numbers, applies country-specific rounding, and can even return multi-rate scenarios when you need to
compare standard vs reduced rates.
{
"country_code": null,
"scenario_type": "single_rate",
"net": null,
"gross": null,
"vat_amount": null,
"vat_rate": null,
"warnings": [
"Not enough information to compute VAT. Provide at least two of: net, gross, vat_amount, vat_rate (or a country_code with rates)."
],
"formatted": null
}
401 invalid/missing key: pass api_key or X-API-Key from your backend.
400 missing country_code: required for country-profile and country-rates.
Calculation warnings: if you see only a warning and no numbers, send at least two monetary inputs.
Conflicting inputs: If you send net, gross and vat_amount that don’t match, the API relies on its internal math; log your raw params if you suspect rounding issues.
Zero-rate logic: For vat_rate = 0 or vat_type = zero, net = gross and VAT amount = 0.
Custom vs country rate: A provided vat_rate always wins over country_code/vat_type. Omit vat_rate if you want pure “country default” behaviour.
Locales & separators: You can safely accept user input with , or . — normalization is handled for you.
Batch use: For bulk imports, keep requests ≤ 100 rps, reuse HTTP connections, and cache stable country profiles.
Added advanced multi-rate mode and improved warning messages for under-specified inputs.
2025-12-01
First public v1 release of VAT API with calculate, list-countries,
country-profile and country-rates actions.
Frequently Asked Questions
You must provide at least two of: net, gross, VAT amount or VAT rate. Optionally, pass a country_code and vat_type so the API can auto-select the correct rate.
The API works with any country you configure in your VAT profiles. You control the available rates, currency and rounding rules per country.
In advanced mode (and without an explicit vat_rate), the API returns multiple scenarios for all configured rates in a country: standard, reduced, super-reduced and zero.
Rounding follows each country profile (precision and mode such as half_up, half_even, floor, etc.). You can also disable rounding completely by sending round = false.
Each VAT calculation consumes a small, fixed number of credits per request. See the pricing table and Credits Estimator above for exact values.
Yes. Every request, even those resulting in errors, consumes credits. This is because your credits are tied to the number of requests, regardless of success or failure. If the error is clearly due to a platform problem on our end, we will restore the affected credits (no cash refunds).
Contact us at [email protected]. We take feedback seriously—if your bug report or feature request is meaningful, we can fix or improve the API quickly and grant you 50 free credits as a thank you.
It depends on the API and sometimes even on the endpoint. Some endpoints use data from external sources, which may have stricter limits. We also enforce limits to prevent abuse and keep our platform stable. Check the docs for the specific rate limit for each endpoint.
We operate on a credit system. Credits are prepaid, non-refundable units you spend on API calls and tools. Credits are consumed FIFO (oldest first) and are valid for 12 months from the purchase date. The dashboard shows each purchase date and its expiry.
Yes. All purchased credits (including fractional balances) are valid for 12 months from purchase. Unused credits automatically expire and are permanently deleted at the end of the validity period. Expired credits cannot be restored or converted to cash or other value. Transitional rule: credits bought before 22 Sep 2025 are treated as purchased on 22 Sep 2025 and expire on 22 Sep 2026 (unless an earlier expiry was stated at purchase).
Yes—within their validity window. Unused credits remain available and roll over month-to-month until they expire 12 months after purchase.
Credits are non-refundable. Only buy what you need—you can always top up later. If a platform-side error causes a failed charge, we may restore the affected credits after investigation. No cash refunds.
Prices are set in credits, not dollars. Each endpoint lists its own cost—see the “Credits / request” badge above. You’ll always know exactly what you’re spending.