# 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: 07 מרץ 2026, 10:28
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.
שאלות נפוצות
עליך לספק לפחות שניים מתוך: נטו, ברוטו, סכום מע"מ או שיעור מע"מ. אופציונלית, העבר country_code ו-vat_type כדי שה-API יבחר אוטומטית את השיעור הנכון.
ה-API עובד עם כל מדינה שתגדיר בפרופילי המע"מ שלך. אתה שולט בשיעורים הזמינים, המטבע וכללי העיגול לכל מדינה.
במצב מתקדם (וללא vat_rate מפורש), ה-API מחזיר תרחישים מרובים לכל השיעורים המוגדרים במדינה: רגיל, מופחת, מופחת במיוחד ואפס.
העיגול פועל לפי פרופיל כל מדינה (דיוק ומצב כגון half_up, half_even, floor וכו'). ניתן גם להשבית עיגול לחלוטין על ידי שליחת round = false.
כל חישוב מע"מ צורך מספר קטן וקבוע של קרדיטים לכל בקשה. ראה את טבלת המחירים ומחשבון הקרדיטים למעלה לערכים מדויקים.
כן. כל בקשה, גם כאלה שמובילות לשגיאות, צורכת קרדיטים. הקרדיטים שלך קשורים למספר הבקשות, ללא קשר להצלחה או כישלון. אם השגיאה נובעת בבירור מבעיה בפלטפורמה מצידנו, נשחזר את הקרדיטים המושפעים (ללא החזר כספי).
צרו איתנו קשר ב-[email protected]. אנחנו מתייחסים למשוב ברצינות—אם דוח הבאג או בקשת הפיצ'ר שלכם משמעותיים, נוכל לתקן או לשפר את ה-API במהירות ולהעניק לכם 50 קרדיטים חינם כתודה.
זה תלוי ב-API ולפעמים אפילו ב-endpoint. חלק מה-endpoints משתמשים בנתונים ממקורות חיצוניים, שעשויים להיות בעלי מגבלות מחמירות יותר. אנחנו גם אוכפים מגבלות כדי למנוע שימוש לרעה ולשמור על יציבות הפלטפורמה. בדקו את התיעוד למגבלה הספציפית של כל endpoint.
אנחנו פועלים על מערכת קרדיטים. קרדיטים הם יחידות ששולמו מראש ואינן ניתנות להחזר, שאתם מוציאים על קריאות API וכלים. קרדיטים נצרכים בשיטת FIFO (הישנים ביותר קודם) ותקפים ל-12 חודשים מתאריך הרכישה. לוח הבקרה מציג כל תאריך רכישה ותפוגתו.
כן. כל הקרדיטים שנרכשו (כולל יתרות חלקיות) תקפים ל-12 חודשים מהרכישה. קרדיטים שלא נוצלו פגים אוטומטית ונמחקים לצמיתות בסוף תקופת התוקף. קרדיטים שפגו לא ניתנים לשחזור או להמרה למזומן או ערך אחר. כלל מעבר: קרדיטים שנרכשו לפני 22 בספט׳ 2025 מטופלים כאילו נרכשו ב-22 בספט׳ 2025 ופגים ב-22 בספט׳ 2026 (אלא אם צוין תאריך תפוגה מוקדם יותר ברכישה).
כן—בתוך חלון התוקף שלהם. קרדיטים שלא נוצלו נשארים זמינים ומועברים מחודש לחודש עד שהם פגים 12 חודשים לאחר הרכישה.
קרדיטים הם לא ניתנים להחזר. קנו רק מה שאתם צריכים—תמיד תוכלו לטעון שוב מאוחר יותר. אם שגיאת פלטפורמה גורמת לחיוב כושל, אנו עשויים לשחזר את הקרדיטים המושפעים לאחר בדיקה. ללא החזר כספי.
המחירים נקבעים בקרדיטים, לא בדולרים. לכל endpoint יש עלות משלו—ראו את תג "קרדיטים / בקשה" למעלה. תמיד תדעו בדיוק כמה אתם מוציאים.