14 ms·
Show HN: A REST API for Calculating VAT in the EU
- timvdalen 10y agoDoesn't seem correct, at least for Holland. 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.
- wayn3 10y agoVAT is technically paid by the customer, you just collect them to make the process slightly less ridiculous. 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.
- mherrmann 10y agoThat is correct. Afaik, you do have to charge VAT to customers outside the Netherlands (but in the EU).
- jacquesm 10y agoYep. But how much to charge is dependent on what you charge for, where your customer is located and whether they are a business (with a registered VAT number in their own country) or a consumer.
- timvdalen 10y agoCorrect, but you're not required to pay the local (Dutch) VAT, so the seller doesn't have to collect it. This tool shows the Dutch VAT rate (0.21) for all buyer countries, which is not correct in that case.
- mherrmann 10y agoI think you're wrong. Just because you don't owe VAT to the Netherlands doesn't mean you don't owe it to another EU country. [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?
- timvdalen 10y agohttps://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/btw/zakendoen_met_het_buitenland/goederen_en_diensten_naar_andere_eu_landen/goederen_en_diensten_naar_andere_eu_landen https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/... >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).
- jacquesm 10y agoGoods and services are dealt with completely differently when targeted at consumers or corporate customers (depending on the country). So there are 4 different combinations times the number of EU countries. And there are more exceptions when it comes to goods depending on the class of goods (food for instance).
- mherrmann 10y agoThis is about b2b. We're talking about selling to consumers. Big difference.
- wayn3 10y agoim not sure. i refuse to do business with anyone in the EU simply because Im not interested in negotiating tax rates with 27 different tax authorities. not worth all the bureaucracy.
- jacquesm 10y agoYou're simply dead wrong about that. When selling services online to consumers you have to charge the going rate in the country of your consumers. VATMOSS is one of the reasons I shut down a small SAAS aimed at consumers, by the time the bookkeeper was done with the VAT filings they'd eaten up all the profits. It's a ridiculous system without any minimum levels.
- BukhariH 10y ago100% agree. In the UK we have a £85,000 threshold for VAT registration which is basically means an extra £17,000 for small businesses. 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.
- timvdalen 10y agoToo late to edit: I've only ever handled the B2B case, this seems to be specifically targeted at B2C.
- jacquesm 10y agoI don't fault you for that, the page is confusing at best.
- kk_cz 10y agoHow about different rates for different goods / services? This looks like a gross oversimplification. Doing VAT correctly is quite hard - there is a reason why there are dedicated VAT specialists working in larger consulting firms.
- mherrmann 10y agoIt's only for digital goods/services.
- kk_cz 10y agoOk, sorry, now I see it :)
- jacquesm 10y agoGoods are - for now - still under different rules but there is definitely talk of expanding the MOSS concept to goods as well. Even so mixed invoices are a fact and any line items passed through this system should be accompanied by the relevant bits so the system can decide which rate to apply. As it is it only works in that one case (digital goods/services to consumers).
- jacquesm 10y agoThis does not make the distinction between consumers and corporate (VAT registered) customers nor does it make a distinction between services and goods (and various classes of goods, to make things even more complicated). Which makes me suspect this is a very broken implementation and you should not rely on it for your business needs.
- mherrmann 10y agoIt is only for calculating tax when selling to consumers.
- jacquesm 10y agoIt's rare to find a business that only sells to consumers. 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.
- Silhouette 10y agoThe EU administration itself or the national tax authorities in the EU should have provided an official service like this to go with the VAT changes for digital sales from day one. 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.
- jacquesm 10y agoThey did, it's called the VATMOSS portal: https://www.ros.ie/vatmoss-web/vatmoss.html https://www.ros.ie/vatmoss-web/vatmoss.html The problem is that it is a pain to use and too labor intensive to be practical.
- Silhouette 10y agoI'm painfully aware of the EU VAT MOSS system and how it "works"[1], but as far as I can see, that doesn't explain the source for the near-real-time tax rate data being offered here. [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.
- jacquesm 10y agoThis is just a lookup table. An actual service should go a lot further to be useful. Note how it does not matter what country the seller is in so that parameter can be ignored. What remains is a - hopefully always up-to-date - lookup table that converts a country code to the highest VAT Rate. That's hardly worth an API.
- Silhouette 10y agoIt's the "hopefully always up-to-date" that is my concern. 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.
- talideon 10y agoThat won't work in Ireland. While 23% is the headline rate, it's not the only rate: https://www.taxworld.ie/vat/summary/vat-rates/ https://www.taxworld.ie/vat/summary/vat-rates/
- Silhouette 10y agoThere are variable rates almost everywhere, but this API is specifically about digital sales (where the MOSS system applies) so it will typically be that headline rate that you need anyway. 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.
- jacquesm 10y agoEspecially for small companies. The cost of compliance can easily outweigh the turnover in countries with few customers and opens you up to being audited on demand by the tax authorities in any country you have customers in.
- Silhouette 10y agoIndeed. I'm not sure we would have done it if we're realised how much of a pain it was really going to be. I know people running slightly larger businesses (a few employees, turnover in the low millions) who have made similar comments even at their scale. There's certainly a view around that it would be better to simply decline sales to customers in other EU member states, and there was even legal advice being taken on whether this broke other EU rules about discrimination. (The conclusion at that time was that it did not, but obviously take your own legal advice if this is relevant to you.) 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.
- vog 10y agoWhile this is a great way for you to collect internal business numbers from other companies, I don't quite see how the benefit for those companies is so large that it warrants sending internal information to you. 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.
- mherrmann 10y agoNo bookkeeping numbers are being sent at all? Unless you count a pair of countries and a post code (without any amounts or anything!!) as bookkeeping.
- vog 10y agoSorry, this was a typo. I meant business information, not bookkeeping information. > 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.
- mike-cardwell 10y agoThis shouldn't be an API. It should be a query library and a dataset you can download with a batch job. Please consider releasing the source code.
- mherrmann 10y agoAll it does is provide a REST API for an existing open source library. That's written on the home page. 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.
- andy_ppp 10y agoI was looking into this recently and found this for Elixir, it looks good: https://github.com/xavier/european_vat https://github.com/xavier/european_vat
- anon2017100 10y agoIn Greece, in some island in the Aegean Sea, the VAT rate stayed at 17% for 2017 (and did not rise to 24%).
- NicoJuicy 10y agoSomething similar, but not the same: http://ec.europa.eu/taxation_customs/vies/technicalInformation.html http://ec.europa.eu/taxation_customs/vies/technicalInformati... Official Europe VAT Verification Service endpoint ( docs ) Edit: for checking the VAT Id
- mherrmann 10y agoYou mean VAT ID verification service. That's needed for when you're selling to businesses in the EU. Then, the VAT you have to charge is 0% and the businesses have to pay it themselves when they buy from you.
- tomschlick 10y agoVAT just sounds like a huge, overcomplicated mistake by the EU. Why do you guys continue to live with it instead of repealing or fixing it?
- thecopy 10y agoWhat do you think the EU is? A democracy? ;)
- stdbrouw 10y agoIt's not easy by any means but neither would I call it a huge, overcomplicated mistake. Even the new rules for digital services are overdramatized – it's really just as simple as charging a different VAT rate per country and submitting a single quarterly VAT return for the entire EU. For most people, if their web store and accounting software doesn't already take care of this, it will soon enough. 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.
- blibble 10y agothe UK did not have VAT prior to joining the EU 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
- stdbrouw 10y ago> if they have any EU customers they must either VAT register in the UK (which adds 20% to their UK prices) 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.
- agopaul 10y agoThe barrier of running an EU B2C business is so high if you need to sell all over EU that most of the time it doesn't even make sense. It's a shame because if you're in the EU and you want to bootstrap a small B2C business you have no choice other than sticking to the country you're in.
- mherrmann 10y agoYes - this API is an attempt to help with that.
- tonyedgecombe 10y agoOr you just outsource it to someone like Avangate.
- agopaul 10y agoI don't know how their service works. Do they pose as a 'gateway company' between you and your customers or are they just a payment gateway? If it's the latter, then the hardest problems still stand since accounting and invoicing is still something that you have to do. 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.
- tonyedgecombe 10y agoThey are buying the product from you and selling it on to the customer. So you only have one customer to deal with and you just need to invoice them once a month.
- mobiplayer 10y agoHow does tax work in the US?
- thiscatis2 10y agoYou should specify a bit more clearly (it's on the bottom though) that this is for B2C. B2B different rules apply.
- ckastner 10y agoWhile the effort in general should be appreciated (especially open sourcing the code!), I'm doubtful that the REST API has practical use. "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?
- mherrmann 10y agoThe data for the API comes from the most widely used open source library on the subject [1]. It has 418 stars, is used by lots of people and is continually receiving pull requests / input from users. I bet you that it is not easy to find another entity (be it a person, an organisation or a piece of software) that knows as much about the problem. 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. [1]: https://github.com/mpociot/vat-calculator https://github.com/mpociot/vat-calculator
- ckastner 10y agoThat's the problem: even with top-notch data, unless you continuously audit the source code, you're still blindly trusting a third-party website regarding tax advice. In the event that something goes wrong, that could be construed as negligent. 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.
- return0 10y agoIf i understand correctly, you have to do take into account the different VATs, and also, if you cross some limits you need to register for VAT in the customer's country. There's a startup (http://www.taxdoo.com/docs/en/ http://www.taxdoo.com/docs/en/) that wants to deal with this mess. In my case, i use an american company to handle virtual goods to avoid this brainteaser.
- thirdsun 10y agoIs there any reason to ask for the country of the business/seller? As far as I know it's irrelevant and the VAT only depends on the buyer's country (for digital goods/services).
- mherrmann 10y agoThe GitHub page [1] of the project this API is based on says it is required for calculating tax when selling in one's own country. I don't know in which exact case though. [1]: https://github.com/mpociot/vat-calculator https://github.com/mpociot/vat-calculator
- nik736 10y agoYou need it for sure. Example: 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).
- thirdsun 10y agoI'm aware of that. However since the service in question only seems to handle the business to consumer case, I don't see a need for asking for seller's country.
- sajal83 10y agoWhy use POST?
- mherrmann 10y agoIt made the curl example easier to write.
- itstrueok 10y agoNice api. Taxation is theft.