Download the PHP package dragonbe/vies without Composer

On this page you can find all versions of the php package dragonbe/vies. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vies

VIES

Component using the European Commission (EC) VAT Information Exchange System (VIES) to verify and validate VAT registration numbers in the EU, using PHP and Composer.

The Vies class provides functionality to make a SOAP call to VIES and returns an object CheckVatResponse containing the following information:

Stated on the European Commission website:

To make an intra-Community supply without charging VAT, you should ensure that the person to whom you are supplying the goods is a taxable person in another Member State, and that the goods in question have left, or will leave your Member State to another MS. VAT-number should also be in the invoice.

More information at http://ec.europa.eu/taxation_customs/vies/faqvies.do#item16

Actions Status Quality Gate Status

GDPR and privacy regulation of VAT within the EU

On May 25, 2018 the General Data Protection Regulation or GDPR becomes law within all 28 European Member States. Is this VIES service package going to be compliant with GDPR?

In short: yes.

The longer answer is that this VIES package only interacts with the service for VAT ID verification provided by the European Commission. VAT validation is mandatory in European countries and therefor this service is allowed as lawfulness and legal basis. Please read more about this in European DPO-3816.1. This service does not store any data itself or collects more information than what's strictly required by law and provided by the EC VIES service.

When you have implemented this service package in your own project, be sure that you're making sure you're just store the VAT ID, the timestamp of validation, the result of validation and optionally the given validation ID provided by the EC VIES service.

Requirements

Please read the release notes for details.

Installation

This project is on Packagist!

To install the latest stable version use composer require dragonbe/vies.

To install specifically a version (e.g. 2.2.0), just add it to the command above, for example composer require dragonbe/vies:2.2.0

Usage

Here's a usage example you can immediately execute on the command line (or in cron, worker or whatever) as this will most likely be your most common usecase.

1. Setting it up

2. See if the VIES service is alive

If using a proxy, you can now use the following approach

3. Validate VAT

Now that we know the service is alive, we can start validating VAT ID's

3.1. Simple usage

3.2. Advanced usage

3.3. Result methods

3.3.1. Is the VAT ID valid?

The most important functionality is to see if the VAT ID is valid

3.3.2. Retrieve the VAT validation identifier
3.3.3. Retrieve validation date

Note: VIES service returns date and timezone, but no time

3.3.4. Retrieve official trader name (not always available)
3.3.5. Retrieve official trader street (not always available)
3.3.6. Retrieve a match for trader name (not always available)
3.3.7. Retrieve a match for trader company type (not always available)
3.3.8. Retrieve a match for trader street (not always available)
3.3.9. Retrieve a match for trader postcode (not always available)
3.3.10. Retrieve a match for trader city (not always available)

Example code

When you run this, you will get the following result:

Community involvement

Here's a list of products or projects that have included this VIES package

If you have a product or a project that's using this package and you want some attribution for your work, send me an Facebook.

Docker containers

If you like to have Docker containers, you can now make use of a container designed for that purpose.

Point your browser to localhost:8000 to use the web interface for validating VAT.

Referenced on the web

Clarification on exceptions

For Greece the international country ISO code is GR, but for VAT IDN's they use the prefix EL. Thanks to Johan Wilfer for reporting this.

Since January 1, 2021 the UK is no longer a member of the European Union and as a result, the VIES service provided by the European Commission no longer validates VAT ID's for the UK. There is one exception though and that is for Northern Ireland (XI) for which VAT ID's can be validated using this library and the EC VIES service.

Licence

DragonBe\Vies is released under the MIT Licence. See the bundled LICENCE file for details.


All versions of vies with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-soap Version *
ext-ctype Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dragonbe/vies contains the following files

Loading the files please wait ....