Giter VIP home page Giter VIP logo

Comments (6)

jonathanmaron avatar jonathanmaron commented on July 1, 2024

VAT number + Registered Company name give better validation result

We have implemented B2B commence systems, were we do not charge VAT, if a valid VAT number is entered during the purchase process.

In this case, a "valid VAT number" is not only a VAT number that VIES says is valid, but in addition one that belongs to the company placing the order (the "buyer").

We have had cases where fraudsters enter a valid VAT number (according to VIES), but it does not belong to their company.

This is a real pain to fix post-order, as in such a cases, the seller is required to charge the buyer VAT, unless he or she provides his or her real VAT number. This involves canceling the original invoice, issuing a corrected one, collecting payment data again (if you are not PCI certified, you will not have credit card information) and finally charging the difference (the VAT) to the buyer's card. All non-standard steps, which incur personnel and transaction costs to be borne by the seller.

Therefore, validating the VAT number belongs to the registered company is very important. If such a check can be reliably implemented with program code, all the better.

from vies.

DragonBe avatar DragonBe commented on July 1, 2024

Funny you mention "reliable" in there, as I believe there's no such thing as reliable validation. But we can come very close to something that covers most cases.

from vies.

DragonBe avatar DragonBe commented on July 1, 2024

From my colleage:

Validating a vat number by VIES is only one of the steps you need to make in order to be able to charge with 0% VAT. You need to check if the vat number you are checking belongs to the company you are selling to. First step in this is to check if VIES sends you back the same company name as the customer you mention on the invoice. Furthermore the sellers responsibility goes beyond that. You need to verify all kinds of information about you customer and build up a customer dossier. In this dossier one point is the vat check but you also need to validate if the person you are selling to is actually working for the company he says he is working for. This can be done by business card or by email conversations with the specific company. Most important is that you can show the tax office that you have done everything in your companies power to verify if the 0% vat rate may be applied on the specific invoice.

from vies.

jonathanmaron avatar jonathanmaron commented on July 1, 2024

I am not an accountant, but according to what I have learned from our (very precise) company accountant over the years, what your colleague has written is accurate.

The final part of your colleague's email is new to me:

"[..] need to validate if the person you are selling to [..] actually work[s] for the company he says he [..] work[s] for"

Good luck implementing that in program code! :-)

Back to validating that the VATIN belongs to the correct company. I see the problem here that people will write their company name in different ways, for example, "A Company Limited" vs. "A Company Ltd." vs. "A Company Ltd" (no trailing period). All these strings are different in program code.

At the end of the day, I think that if we do try to validate the VATIN against the company name, we would need to implement a "similarity" algorithm, and set a threshold. Anything above this threshold would then be considered valid. Of course, this logic assumes that VIES returns the company name for all member states (I am not sure it does).

I am always disappointed with VIES. VAT is fundamental to B2B commerce in Europe. I always think the EU should be able to provide a rock solid way of validating VAT numbers. The tax offices in each member state maintain an official list of valid VAT numbers. In my mind, it cannot be so difficult to aggregate this data and provide them via a high speed, modern REST service. Sigh...

from vies.

DragonBe avatar DragonBe commented on July 1, 2024

Hey @jonathanmaron, I've been digging into the whole VAT regulation and the big challenge is that for the 27 countries in the EU, there are also 27 different VAT regulations and validation rules which makes it all a very complex to wrap in a "simple" tool to validate VAT numbers.

At the end of the day, I think that if we do try to validate the VATIN against the company name, we would need to implement a "similarity" algorithm, and set a threshold.

In regards to your statement above I was looking into PHP functions soundex(), metaphone() and levensthein() that might be able to set tresholds and find "similar" meanings of strings.

Even though implementing similar strings is already lifting this project into a very advanced level, I do believe it also will be the essential tool for people implementing a rock-solid validation of VAT acocunts. But before I'm going to implement it, I need to more research on all three functions as I haven't used them at all and have no clue how they depend on locality and other language extensions.

I would like to have your input on this as well, as this moves the project into a complete new level.

from vies.

DragonBe avatar DragonBe commented on July 1, 2024

I never got any feedback on this so I'm closing this issue

from vies.

Related Issues (20)

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.