Giter Club home page Giter Club logo

vat-rates's Introduction

πŸ’Έ {Digital,Cloud,Electronic,Online} Services VAT Rate Database

Some countries requires businesses to apply, for any sales of online/electronic/digital/cloud services to consumers (B2C), a value-added tax (VAT) on all purchases made by their citizen. This impose all foreign companies to track the residency of all their customers, to apply the right tax.

This trend started January 1st 2015 with all European country, and is about to be implemented by others too.

As the rate depends on the locality of the customer, this project aims to centralize, in a machine-readable format (currently a plain CSV file), the list of applicable rates for each country of residence, and all their territorial exceptions.

This is a painful job, worth sharing with a community, so please help me keep this database up to date! :)

Testimonials

I'm impressed with your BFPO detail. -- Tim Whitlock

I'm glad to see independently researched data confirming mine! -- Will Bond

VAT Application Rules

All B2C customers matching the locality in that file are subject to the corresponding tax.

Your B2B customers are exempted of VAT, as long as they provide a registered VAT number. You can check their validity on the VAT Information Exchange System (VIES). I recommend using a third-party library to automate the process, like pyvat for Python. A B2B customer without VAT number is considered as a simple B2C customer, so local rate applies.

Note that starting January 1st, 2015, these rules applies to all non-European SaaS businesses with European customers.

Status

This matrix expose the current completeness of the database:

Administrative family EU member states Special territories, states, countries, collectivities, islands, departments, towns, …
Number βœ… 28 / 28 βœ… 57 / (?)
Standard rates βœ… All βœ… All
Reduced rates ❌ None ❌ None
Increased rates ❌ None ❌ None
Parking rates ❌ None ❌ None
Currency codes βœ… All βœ… All
Historical standard rates βœ… All ❌ None
Historical reduced rates ❌ None ❌ None
Historical increased rates ❌ None ❌ None
Historical parking rates ❌ None ❌ None
Historical currency codes ⚠️ Wrongly aligned to current one ⚠️ Wrongly aligned to current one

Schema

start_date is an inclusive ISO 8601 calendar date from which the rate starts to apply.

stop_date is an inclusive ISO 8601 calendar date from which the rate is no longer valid.

territory_codes is a list of (eventually mixed):

currency_code is the de jure ISO 4217 currency code (a.k.a. legal tender), not de facto's one.

rate is the decimal rate.

rate_type is the kind of rate. Either:

  • standard
  • increased
  • reduced
  • parking

description human-readable description of the territory the rate applies to, and eventual rationale behind the application.

Rows are sorted by territory_codes, then start_date.

Interpretation

Starting from this database, your next step is to interpret the data.

By looking at the dates, you can compute if a rate is either current, historical or future. Beware, some rates changes in the middle of a month. That means on theory, your billing system should support pro-rata application of several rates on a monthly invoice.

To choose the right rate, you then need to guess the location of your customer. I advise you to derive this data from the billing address, as it's the most common element with the necessary administrative granularity. An address that is properly normalized is precise enough, down to the postal code, to select the right VAT rule, including territorial exceptions. To solve the territory complex, I wrote a Python module to parse and normalize postal addresses.

Sources

The process of building up this database is somewhat fuzzy.

This database is unequivocally founded on the latest official VAT Rates document from the EC portal. It provides all member states' rates and their historical values. You'll also find there a description of regions and territories where special or no VAT rates applies.

Still, the hardest part of establishing this database lies in the characterization of locality. Member states and some regions are easy: they have a dedicated country code. For these we rely on ISO 3166-1 alpha-2, with an extra compatibility layer for European Commission country codes (i.e. the GB/UK and GR/EL pairs).

When this is not enough, we go down to a lower administrative level and leverage subdivision codes from ISO 3166-2.

Things get messy once VAT rules only applies to areas as small as a town. In which case I guesstimated the geographic zone with postal codes fetched from individual Wikipedia pages.

Finally, for completeness, I compiled the catalog of member's states special territories and restarted the locality characterization process for these. I was able to add the missing entries based on the list of included and excluded zones of the EU VAT area.

Other resources

History

I decided to create this database because all the current VAT libs were quite naive about the territory definition. Most of the time it's only based on the country, while the territory a tax applies to, in a fiscal context, is a much more insidious concept carrying administrative, political and historical weight.

To match the place the supply takes place against the VAT database, I created a Python module to normalize and parse postal addressed of my customers.

License

The content of this repository is licensed under a BSD 2-Clause License.

vat-rates's People

Contributors

dbcontext avatar gregoriol avatar kdeldycke avatar l-naumann avatar robzwolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vat-rates's Issues

Add non-European VAT rates

The VAT mechanism on foreign online services for B2C customer is being adopted by other countries.

It might be a good idea to register them in this inventory.

So far, we have:

Country ISO code Start date Rate Sources
Russia 2019-01-01 between 18% and 20% (1), (2)

Temporary LU tax rate for 2023

It seems that Luxemburg has decided a temorary change of VAT rates for 2023 as per https://guichet.public.lu/en/actualites/2023/janvier/02-modification-taux-tva.html:

A temporary reduction in VAT rates (-1 percentage point) applies from 1 January 2023 to 31 December 2023.

The following [VAT rates](https://guichet.public.lu/en/entreprises/fiscalite/tva/notions/tva.html) are applicable during this period:

standard rate: 16 % (decrease from 17 % to 16 %);
intermediate rate: 13 % (decrease from 14 % to 13 %);
reduced rate: 7 % (decrease from 8 % to 7 %).
The super-reduced rate of 3 % remains unchanged.

Document the exact format of the CSV

It could be great for parsers to provide information on the exact format of the provided CSV:

  • field delimiter character
  • field enclosure character
  • escape character

Also that:

  • territory_codes are separated by \n

(could be guessed, but better if documented!)

VAT area exclusions with low rates

Hi.
I'm now using your data in my application. So many thanks!

Regarding the "low tax" regions of Guadeloupe, Martinique and RΓ©union. As far as I understood (which is not very well) these are excluded from the EU VAT area. Is this your understanding too?

I see you link to the same Wikipedia page I'd got my information from. HMRC also have this page which seems to imply I don't have to charge VAT in these countries.

If these countries are excluded but have non-zero rates, then perhaps the table needs a flag to indicate whether VAT is chargeable by vendors in EU member states?

Or perhaps I'm totally wrong and I should be charging 8.5% in these countries from the UK.

Differentiate non-EU VAT rates

A few commits ago, you have added a few non-EU VAT rates.
However, these are not handled in the same way at accounting level (MOSS, VAT number, ...).
So, not sure it is a good idea to mix EU and non-EU rates without differentiation.

There could be for example a column indicating if it is a rate applying per the EU system or not.

Also, maybe add a reference link to the documentation about where the data for those new rates comes from and how to handle them.

Add missing translations

We now have an i18n translation template available since commit 4ce518e . We now need to populate the i18n folder with all translations.

We're lucky, most translations are available on Wikipedia. See the Abbr. and Name columns from this VAT rates table.

Brexit.

Hello everyone,

As you might have heard, UK has left the EU this January first.

The last line from the csv (for UK) is :

2011-01-04 Β  GB UK IM GBP 0.2 standard United Kingdom (member state) standard VAT rate. Isle of Man (British self-governing dependency) is member of the EU VAT area and subjected to UK's standard VAT rate.

Should a line be added with the 0 vat rate ?

Thanks in advance,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.