We open-sourced our internal Magento 2 module that keeps EU VAT rates and Tax Rules in sync automatically. It's on Packagist as storetown/module-tax-sync, MIT-licensed, and you can install it in one composer command. Here's why we did it and how it's built.
The pain you didn't know you had
If you run a Magento 2 store that ships across EU borders, you're probably maintaining ~50–60 tax rates by hand. Standard rate, reduced rate, sometimes a second reduced rate — for 27 EU countries, then Switzerland, the UK, and Norway if you care about those markets.
You added them once during the shop setup. Then someone in Finland decided 25.5% was a better number than 24% (true story — happened in 2024). Then the Covid-era temporary reductions expired in five countries on different dates. Then Estonia announced a 24% standard rate effective 2025-07-01.
Every time, an email lands in your finance team's inbox. Someone forwards it to dev. Dev edits Stores → Tax Zones and Rates. If they edit the rate but forget to recompile the cache, frontend prices stay wrong for a week. If they remember the rate but forget to map it to the right Tax Rule, the change quietly never takes effect on any product.
We've been running a small Magento 2 agency in Hamburg since 2014. We've watched this scenario play out across maybe a dozen client shops. So years ago we built a small internal module that does it for us. Last month we cleaned it up, ripped out the agency-specific bits, and put it on GitHub.
What the module does
storetown/module-tax-sync — MIT, free, no telemetry, no signup:
- Pulls all 27 EU VAT rates from the EU VAT Rates API (the official one) — standard and reduced
- Optional: CH, GB, NO (toggleable in admin)
- Auto-creates Tax Rules, not just Tax Rates. This is the unsexy but important bit. Most Magento extensions stop at Rates. Ours wires the Rates up to your existing customer tax classes and product tax classes so the change is actually applied.
- Runs on cron (daily/weekly/monthly — your call) and exposes manual sync via admin button + CLI
- Sends an email diff when rates change: which country, old rate → new rate
- Falls back to bundled static data if the EU VAT Rates API is unreachable, so you never get a broken sync
Install
composer require storetown/module-tax-sync
bin/magento module:enable Storetown_TaxSync
bin/magento setup:upgrade
bin/magento cache:flush
That's it. Go to Stores → Configuration → Storetown → EU Tax Rate Sync, set your sync frequency and notification email, click Sync Now.
Architecture decisions worth knowing
- We picked the EU VAT Rates API over scraping
There's an EU Commission API that returns official current rates as structured data. We use it. Some commercial Magento tax modules scrape national tax authority sites individually — that breaks the moment Germany redesigns their tax page (which happens roughly every 18 months). The EU API doesn't have that fragility.
- Tax Rules are auto-created with predictable names
When the module creates a rate, it names it DE-Standard, DE-Reduced, AT-Standard, etc. The Tax Rule that wraps it gets a matching predictable name. This is deliberate — it means a future you can grep for them, automate around them, and tell at a glance what's ours vs. what was set up manually.
We don't touch any rate or rule whose name doesn't match our prefix. So your hand-crafted "DE-Special-Books-Reduced" rule survives any sync.
- Fallback data lives in the repo
Storetown/TaxSync/Data/fallback-rates.json is committed and updated with each release. If the EU API is down (it has been; once for 18 hours in late 2024), we fall back to this. Admins get a notification banner that says "API unreachable — using fallback from version X.Y.Z, last updated YYYY-MM-DD".
This is the kind of detail that matters in production but is annoying to write. So we wrote it once.
- CLI for CI/CD pipelines
bin/magento tax:sync:run do a sync now
bin/magento tax:sync:status last sync time + result
bin/magento tax:sync:run --dry-run show what would change, don't write
Plumb that into your deploy pipeline if you want — we run --dry-run on staging before every prod deploy.
Why open source, why now
Three reasons.
Reason one is honest self-interest: we're a small agency. Our four paid Magento extensions (checkout, B2B registration, attachments, surcharges) are what pay the bills. The tax-sync module was never going to be one of them — it's too narrow, the buyer pool is too small to support pricing. So either it stays internal and only our clients benefit, or it goes public and anyone running Magento 2 in the EU can use it.
Reason two is that maintaining it inside the agency was actually a slight drag. Every client onboarding meant copying it from one repo to another, occasionally forgetting to update a deprecated method, hand-merging fixes back. Public + Composer + semver = those problems go away.
Reason three is that we'd been quietly using the EU VAT Rates API for a year and seen exactly zero open-source Magento 2 modules using it. There are a couple of paid ones. There's a Drupal module. There's a Shopify app. For Magento 2 it's been DIY or pay €300/year. That gap shouldn't exist in 2026.
What we'd love help with
The roadmap is small and the issues are open:
- More fallback data updates (PRs welcome — just bump
fallback-rates.jsonand tag a release) - Multi-store config: if you run a multi-store with different default countries, we'd like to refine the per-store override logic
- An eventually-consistent "rate history" view in admin (we have the data, we don't yet have a UI)
Repo + Issues: https://github.com/storetown-media/stm-magento-2-eu-tax-rate-sync
If you're running Magento 2 in the EU and tired of hand-maintaining tax rates, give it a try. And if you're at a Magento agency that does the same hand-maintenance dance, tell us — we'd love to compare notes.
Storetown-Media is a small Magento 2 agency in Hamburg. We've been building Magento extensions since 2014. Our paid catalog is at storetown-media.de/produkt-kategorie/downloads/magento-extensions/ — but this one's free.
Top comments (0)