Show HN: A REST API for Calculating VAT in the EU
vatmossapi.com
vatmossapi.com
I appreciate someone else stepping up and doing it, though I'd want to see more information about the source(s) they were using for the data and how frequently they were checked before I'd hook a real business up to a third party service like this.
The problem is that it is a pain to use and too labor intensive to be practical.
[1] Obviously it doesn't really work very well at all, and multiple national tax authorities have already been caught sending unjustified threats to many businesses for money they never owed, among other screw-ups.
That's hardly worth an API.
There are, at minimum, 28 different rates to monitor here. They can be changed arbitrarily by their national governments, and in at least one case already such a change has been made with just a week's notice.
Even if you're only checking those rates against your existing look-up table manually, the effort to do so at least every week is going to add up.
There should have been an authoritative, machine-readable source for this data from day one, and vendors should have been able to rely on that data and protected from consequences if the authorities provided incorrect information and vendors acted on the incorrect information in good faith.
I mean no disrespect, but you're asking anyone relying on your API to trust you with their business. If you or anyone you rely on makes a mistake then your user will probably be breaking the law and on the hook for any missing tax. Moreover, by the nature of this system, the damage could be done in real time before any human reviews and approves any changes to what the customer's business is charging.
I don't think it's unreasonable to want more information than you (or your immediate source) currently provide before giving that level of trust in this situation.
Yep. And the fines for VAT errors range from 'don't care' to 'existential' depending on the amount and the time before the error was detected.
The biggest danger that I see is what will happen when the rates change.
It would be great to have a service that resells your goods/services and takes care of all that stuff so you can send a single invoice to them every month and that's it, but frankly, I'm not sure of the legal part of that.
I have my business in Germany. If I write an invoice to a german company I add 19% VAT. If I sell to a company inside the EU but not in Germany I add 0%, since it's a reverse charge.
That means that the company in the EU country directly pays the taxes to their country and I don't have to pay it to my country. This solves a lot of bureaucracy hassle.
Exception is where I am selling to no business, but a private person within the EU, I will charge VAT there and pay it to my country which redirects it to the EU country (that's called MOSS).
"I calculated the VAT for the products I'm selling using that one website" is just too much of a liability risk for a business to take. Who do you hold liable in the event that the calculation was wrong?
Of course, you are right about liability. You can sue your accountant. But I assume it will be more difficult for an open source project.
Hence why I appreciate that yours and the other project are open source! Because even though I might not be able to use the REST API, I can certainly download the code and integrate locally after auditing it, or having it audited by my accountant, or tax attorney, or whatever.
In my case, i use an american company to handle virtual goods to avoid this brainteaser.
Official Europe VAT Verification Service endpoint ( docs )
Edit: for checking the VAT Id
Of course, there's no guarantee that that will always be the case, and to know for sure you need to understand the tax systems of 28 different EU member states. This is (one of many reasons) why the new EU VAT rules have been so controversial: the burden for reliable, full compliance is ridiculous.
To give credit where it's due, the API we're talking about here does aim at one of the significant pain points once you've gone through the hassle of updating your charging, invoicing and reporting systems, which is keeping up with changes for all of those VAT rates. At least once already, a relevant VAT rate has been changed with only one week's notice, which is crazy. Are all businesses really expected to monitor these things on a daily basis, just in case the rate in a country where maybe you don't even have any current customers changes and then someone from that country buys something?
As an aside, if you're selling within the EU, are you sure you're not subject to audit by any tax authority from any EU member state anyway, even if you haven't reported any sales to that country? I haven't checked the exact rules recently, but I remember this was one of the concerns when the new scheme was introduced. In theory, any other tax authority is supposed to contact you via your own national authority under such circumstances, but as I mentioned elsewhere, we know first-hand that this doesn't always happen.
The API could be useful if it is guaranteed to be always up-to-date, but there is no such guarantee, and it makes it impossible as it is coded right now to do anything else but to compute a sale that has just happened rather than a sale which happened at a specific point in time (which is how you should compute the VAT). Edge cases around end-of-year and rate changes will cause all kinds of trouble.
VATMOSS is super annoying to put it mildly and disproportionally hurts small players because it does not have a floor below which it is kept simple.
I'm sorry to hear that, though sadly not surprised.
It's also scary how much misinformation or simple ignorance is out there about this issue, and I'm talking generally here not just about parts of this HN discussion. I saw a discussion on another forum recently, and someone there was stubbornly maintaining that compliance was easy and they'd done it and helped other people to do it, yet there was no indication at all that they'd even been aware of the number of edge cases and minor details that can affect what you're supposed to do. I suspect they'd just slapped country-level geolocation on a customer's IP address, checked a country they got from a payment service, and looked up the headline VAT rate, or something along those lines. To be fair, that would probably give the right answer most of the time.
As people have noted in various other comments here, you also have to keep up with any changes in the rates themselves and understand any local rules in each member state on which rate applies, possibly deal with just plain incorrect demands from foreign tax authorities or more reasonable but still onerous tax audits if your number comes up, and of course there are the basic overheads for operating a second tax scheme on top of your national one in the first place, including some slightly eccentric rules for dealing with exchange rates if they affect you.
Also, the VAT rules don't override consumer protection rules about advertising VAT-inclusive prices for B2C sales, which creates some interesting dilemmas if you're running a web site where you want to show correct prices based on a visitor's location but you don't have sufficient evidence until you get to the payment step to actually verify that location to a satisfactory standard. The only completely safe solution to this that I know is to advertise a fixed price to everyone, which means you're taking the VAT hit directly from your revenues and if nations change their VAT rates then it's your business that wins/loses, not the customer, which is entirely not how VAT is supposed to work.
likewise, I simply now do not sell to customers based in the EU outside of my country
the EU is run for the benefit of large businesses, small business is simply an afterthought
However the sevice discussed in this submission deals with VAT for digital goods and services. Selling shoes, regardless if done via internet, phone or fax, is not considered a sale of a digital product.
For this to be useful as an API, it would need to deal with the actual complicated bits of VATMOSS, which is dealing with multiple different rates for different product types.
By the way, do you plan to provide statistical summaries of your findings? Such as: How many companies from country X works with what set of countries Y? How many invoices do they (approximately) file to which country?
EDIT: Fixed typo.
> Unless you count a pair of countries and a post code
It is more than that. You also have the source IP address, which you can map not only to countries, but to relatively small regions and sometimes to individual companies.
If this service was meant to be "datensparsam", it would provide an updated table or dataset, and not require a single request for every small bit of information.
If you don't do that properly you're either leaving money on the table or you could be later charged with the difference. Note that under VATMOSS any of the tax adminstrators in the EU has the right to audit you so it really pays off to do this well.
And it's the 'place of consumption' rather than the 'place of supply'.
Yes, but such sales are outside the scope of the VAT MOSS scheme.
Note that under VATMOSS any of the tax adminstrators in the EU has the right to audit you so it really pays off to do this well.
We're well aware of this. We spent a great deal of time trying to implement a fully compliant system when the new rules came into effect, and we were still among the first businesses to get one of the fake demands for money never owed because apparently with our vast resources as a little family business we were better at getting it right than several national tax authorities with the resources of an entire government behind them. If that isn't a perfect illustration of the impracticality and excessive burden of the current system, I don't know what is.
And it's the 'place of consumption' rather than the 'place of supply'.
No, for digital services and private consumers, it's the place of supply rules that changed:
https://www.gov.uk/government/publications/vat-supplying-dig...
Of course the practical effect of the changes is typically that the place of supply is now treated as the customer's location where previously it was probably the business's location, so perhaps that's what you meant and we're really talking about the same thing here.
So why ask for the country of the seller in the API?
> Of course the practical effect of the changes is typically that the place of supply is now treated as the customer's location where previously it was probably the business's location, so perhaps that's what you meant and we're really talking about the same thing here.
Yes, that's what I meant.
BTW that 'demand for money' also happened to me, it appears that in the first few months of VATMOSS there was a massive cock-up at the Irish department tasked with this leading to a whole pile of nastygrams sent to lots of EU businesses, they never even apologized for that (or sent any follow up saying that they were in error).
I wondered the same thing. I'm not aware of any circumstances under which it would make a difference that are still affected by MOSS.
BTW that 'demand for money' also happened to me
My sympathies. The Irish department reportedly wasn't the only one to mess up like this, either, though it's the only one I've encountered personally so far. In the UK, it was actually HMRC (our own national tax authority) that sent out messages to affected businesses confirming it was an error.
I must admit I'm not 100% sure either. I'm just exposing the API of the underlying open source project which says to supply the seller's country [1].
[1]: https://github.com/mpociot/vat-calculator At the bottom, where it says "Important"
Yes.
> Tell me: How is having this field, unnecessary or not, a risk?
- an unnecessary field implies that that field is either being collected or being used in the calculations, if it isn't then it simply should not be there.
> But it's providing value to my own business, and apparently other people find it interesting as well.
I'm sure it is, but it is also a risk and it seems as though you have not done the homework required to field a service such as this. That's a dangerous hobby.
> It's merely a REST API for an existing open source project.
No, it is a piece of software that you field that has the risk of affecting businesses that use it in a critical and potentially negative way if you mess up and it does not appear that you treat this subject with the seriousness normally associated with such a project.
> And whether people use the library or the REST API is the same from a risk perspective from their point of view.
That is so far from the truth that I again wonder if you know what you are doing.
> I'm providing value here, and am happy to run the risk you're advising against. > So I will not take it offline.
Suit yourself.
You really should make the limitations and the targeted audience for the service absolutely clear or you're going to create a world of hurt for the people that use your service thinking you are solving a problem for them.
Essentially you are giving tax advice, that's not an arena you should walk into without professional guidance to make sure you get this 100% right, both from a liability perspective as well as from the perspective of your customers who will come to rely on it (and who won't be able to point at you if you get something wrong).
Things you need (at a minimum):
- the date of the transaction (in case a transaction is processed for a date in the past or the future rather than at the moment of the API call when the rates were different than they are today)
- a means to update VAT rates exactly when they are changed in real life (typically: a system that remembers the VAT rates historically)
- a way to identify the nature of the customers (business / private individuals)
- a way to identify the nature of the product sold (goods, services, a combination of both, and what kind of goods)
- a data privacy statement (you're dealing with consumer data if the API is called from within a webpage running on the consumers browser)
And whatever else I've forgotten but which your local VAT/tax consultant should be able to answer.
You are taking care of one very simple case which the VATMOSS portal in a way already handles without clearly delineating what that case is and which cases you explicitly don't handle.
The easiest improvement to the site would be to include a large font line at the top stating this limitation.
"This tool is only to calculate VAT when selling services or digital goods to consumers"
Also, I think part of what throws people off about what the intended use case is is that you ask for the zip of consumer and country of origin of seller, which does not matter for VATMOSS, it is the country the consumer is in that determines the rate so you don't actually need the country of origin for services/digital goods as far as I know.
Please consider releasing the source code.
You can use the existing open source library (if you're using PHP). But then you have to keep it updated. The API does that for you - as well as allowing you to use it from any language.
Why do you guys continue to live with it instead of repealing or fixing it?
The complexity of VAT in Europe is recent.
(I think) it used to be the case that if you sold something from one European country to another, then you weren't subject to VAT because it was considered an "export". Foreign companies (esp. US-based ones like Amazon) exploited this loophole so much, it became a problem. All they had to do was set up shop in a small, low-tax country [1] (Luxembourg / Ireland) and sell in every other country tax-free.
So the EU created this rule that the VAT that should be paid, is the VAT of the country where the customer resides -- it had to be, because if it was the VAT of the seller's country then companies would have again clustered in the country with the lowest VAT in order to evade the new rule.
It's not a bad rule; if you're a huge corporation, well, maybe you don't like it but you can hire the necessary lawyers and accountants to implement it.
If you're an SMB that sells across Europe, it's absolutely horrible. I guess the bureaucrats who wrote the rule didn't care much about SMBs or thought there were few who sold internationally.
It would be simple to exonerate SMBs based on their revenue (and I think it's the case, but the triggers are very low and different in every country); it would be even simpler to have just one tax rate but that's politically impossible.
In practice it doesn't seem to be very much enforced for small companies.
- - -
[1] Low corporate tax, to optimize taxes even further; no need to be based in a low-tax country to free oneself from VAT; the smaller the country the better, because you want to have as few of your customers in the same country as you, as possible.
Now, what is unnecessarily complicated about VAT in Europe is the presence of very many exemptions. So rather than just doing the same paperwork for every good you sell, you have to consult a database to figure out that you should pay a reduced rate for good X or no VAT at all for good Y. This was done in the name of fairness to the poor — it doesn't seem right to tax essentials like staple foods or hygiene products. But arguably, it would have been much simpler to grant the poor an income tax break sufficient to cover the VAT they are likely to pay for such goods.
The end effect is the same: the consumer ends up paying whatever % the tax is. The difference is in how it's collected. Sales tax is easier to evade because business-to-business sales usually don't charge sales tax. So you could wink at your customer and say they're a business and not charge them sales tax. With VAT everyone is supposed to pay it, so it's harder to evade (and consequently more expensive for governments to collect).
One of the things regulators want from a tax code is to stop large companies picking their jurisdiction to avoid sales tax, and therefore gain an unfair advantage. The MOSS is really annoying for microbusinesses, like musicians wanting to sell their album online, but compliance is easily handed off to an accountant for anyone working on such things full-time.
Also, every EU member state already had VAT and already had differing rates and rules before joining the EU, so the complexity was already there.
VATmoss has been disastrous for small online UK businesses.
UK businesses do not have to register for VAT until their turnover exceeds a figure (£80,000 odd).
with VATmoss: if they have any EU customers they must either VAT register in the UK (which adds 20% to their UK prices), OR register and fill out VAT returns for each member state they have customers in, which is not really feasible
I have simply stopped selling to EU customers... "single market", yeah right.
The EU commission's answer to this has been "we know this is a problem for small businesses. we'll sort it out when we discuss it in 2019"... not good enough.
all this bureaucracy was an attempt to try and get Amazon to pay their fair share of VAT... to hell with the small businesses
While I'm sympathetic to the fact that this will increase your administrative burdens, in terms of your bottom line this really won't make much of a difference, because once you register for VAT you can also deduct it for all the costs you make – you only pay tax on the value you add, hence the name.
Thanks for the correction re: the UK not having VAT before joining the union, didn't know that.
Might it affect your profitability? Definitely possible. But it won't eat up 20% of your revenue or require you to charge 20% more to break even.
- £10,000 to produce a infinitely reproducible widget -> costs of £10,000
- sell 5,000 times for £10 -> income £50,000
profit of £40,000with VAT:
- £10,000 to produce a infinitely reproducible widget, all allowable, 20% VAT back -> costs of £8,000
- sell 5,000 times for £10 - (approx) £2 VAT -> income of £40,000
now I have a profit of £32,000 insteadif I'm selling mostly domestically the logical conclusion is to no longer sell to non-domestic EU customers
At that point, 5000 widgets at 10 net = 50000 - 8000 net costs = 42000 -> as a business, if your costs include VAT, you're actually better off by opting in. Sure, you feel the pain when you first transition (which is why you should have started with it right away), the first couple of years the taxman will be greedy, and vatmoss is a clusterfuck in its own right, but vat as a concept is actually extremely business-friendly. (I say that as someone who hates it for the regressive flat-tax on the poor that it actually is; I'd be happy to lose it tomorrow in exchange for higher corporation tax, but that won't make you any happier...)
the actual numbers above are examples, but the scenario matches mine pretty much perfectly, so I'm not sure why you would say that I'm misrepresenting anything
these are digital services, not cars or cans of soup
There should be a single source of truth for the rates data, and there should be an api instead of having to rely on a third party for that information.
As far as I'm aware, as a seller in The Netherlands, you only have to charge VAT for buyers that are also in The Netherlands.
therefore, VAT is paid based on customer location.
this does not mean that you dont have to pay VAT at all if you sell to germany. in that case, you ahve to pay german VAT. if youre smalltime enough, its likely that nobody will go after you, but thats what it is.
[edit] Maybe I misunderstood. In what situation do you think you don't have to pay Dutch VAT, and what's the source of your information?
>Over het algemeen brengt u geen btw in rekening aan ondernemers uit andere EU-landen. Bij goederen past u dan het 0%-tarief toe en bij diensten wordt de btw naar uw klant verlegd.
In general, you should not charge VAT to entrepreneurs from other EU-countries. For goods, the 0%-tariff applies. For services, the VAT is transferred to the client. (Which means they need to declare the transaction and pay VAT in their country, which has nothing to do with your transaction with them).
not worth all the bureaucracy.
The bigger problem is that these rules were made to target companies like spotify and amazon who are large enough to simply work around the rule, effectively penalizing SMBs without any upside.
Highly annoying.
However, VAT MOSS has no threshold. That means small businesses now have to make a decision between keeping that extra £17k and not selling to the EU or selling to the EU and forgoing the £17k tax break.
Awfully designed system.