PHPackages                             codedge/laravel-bzst-evatr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. codedge/laravel-bzst-evatr

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

codedge/laravel-bzst-evatr
==========================

A library for validating value added tax identification numbers (VAT ID) using the German Federal Ministry of Finance EVATR interface.

1.0.1(9y ago)15665[1 issues](https://github.com/codedge/laravel-bzst-evatr/issues)MITPHPPHP &gt;=5.4.0

Since Jun 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/codedge/laravel-bzst-evatr)[ Packagist](https://packagist.org/packages/codedge/laravel-bzst-evatr)[ RSS](/packages/codedge-laravel-bzst-evatr/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel 5 package for EVATR - Validating VAT IDs
================================================

[](#laravel-5-package-for-evatr---validating-vat-ids)

[![Latest Stable Version](https://camo.githubusercontent.com/7df4119c53cc10f22ab91fa20be33d06685a8719478c9ed893e91bd47ce9d2b5/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d627a73742d65766174722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-bzst-evatr)[![Build Status](https://camo.githubusercontent.com/5477a904aae511dfc65b2a977074047f5013fb449a9bd38af70da47ff73a8f47/68747470733a2f2f7472617669732d63692e6f72672f636f64656467652f6c61726176656c2d627a73742d65766174722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/codedge/laravel-bzst-evatr)[![StyleCI](https://camo.githubusercontent.com/06964e0b8a101fc4f215a0a2b3b096fa34bb82dc11813da9e96640aa279520ee/68747470733a2f2f7374796c6563692e696f2f7265706f732f36313338333938312f736869656c64)](https://styleci.io/repos/61383981)[![codecov](https://camo.githubusercontent.com/cdb1fd2c0298cc51da25c09cbb343ed61a33ca82f74061f9ed8706d9fd9914bb/68747470733a2f2f636f6465636f762e696f2f67682f636f64656467652f6c61726176656c2d627a73742d65766174722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/codedge/laravel-bzst-evatr)[![License](https://camo.githubusercontent.com/0a5b574cd4ac733666f8fe7111db09c1cfdefade4eed3294ec7a4d801970cdfc/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d627a73742d65766174722f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-bzst-evatr)

This library is a wrapper for the XmlRPC interface to validate European VAT IDs.
See  (German version).

With this library you can check an European VAT ID if it is valid. Additionally you can pass in and address of this European VAT ID and do an address check.

The library supports the *simple* and the *qualified* request.

- Simple request:
    - Checks if a certain foreign VAT ID is valid at the time the request is made.
- Qualified request:
    - Additionally checks if the address (company name, street, city and zip code) connected to the VAT ID matches with registered data in the foreign country.

All error messages are available in English or German - of course you can modify those as you like.

Install with Composer
---------------------

[](#install-with-composer)

To install the library using [Composer](https://getcomposer.org/):

```
$ composer require codedge/laravel-bzst-evatr
```

This adds the *codedge/laravel-bzst-evatr* package to your `composer.json` and downloads the project.

Next run: `php artisan vendor:publish`to publish the translation files of the library to `resources/lang/vendor/evatr//messages.php`.

Don't forget to add the *Service Provider* to your `config/app.php` `[1]` and optionally the *facade* `[2]`:

```
// config/app.php

return [

    //...

    'providers' => [
        // ...

        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        Codedge\Evatr\EvatrServiceProvider::class, // [1]
    ],

    // ...

    'aliases' => [
        'App' => Illuminate\Support\Facades\App::class,
        'Artisan' => Illuminate\Support\Facades\Artisan::class,

        // ...

        'View' => Illuminate\Support\Facades\View::class,
        'Evatr' => Codedge\Evatr\Facades\Evatr::class, // [2]

]
```

Usage
-----

[](#usage)

If using the facade, just do:

```
// app/Http/routes.php

Route::get('/', function () {

    Evatr::setOwnUstId('123');      // Or use an alias: Evatr::setUstId1('123');
    Evatr::setForeignUstId('123');  // Or use an alias: Evatr::setUstId2('123');

    Evatr::query(); // Fires the XmlRpc call

    echo 'Error code: ' . Evatr::getResponse()->getErrorCode();
    echo 'Error message: ' . Evatr::getResponse()->getErrorMessage();

    echo 'Date: ' . Evatr::getResponse()->getDate();
    echo 'Time: ' . Evatr::getResponse()->getTime();

});
```

Alternatively you can use the dependency injection of the singleton instance like so:

```
// app/Http/routes.php

Route::get('/', function (Codedge\Evatr\Evatr $evatr) {

    $evatr->setOwnUstId('123')
          ->setForeignUstId('123')
          ->query(); // Fires the XmlRpc call

    echo 'Error code: ' . $evatr->getResponse()->getErrorCode();     // Get the interface error code
    echo 'Error message: ' . $evatr->getResponse()->getErrorMessage();  // Get the interface error message

    echo 'Date: ' . $evatr->getResponse()->getDate();
    echo 'Time: ' . $evatr->getResponse()->getTime();

});
```

All date and time methods return a [Carbon](http://carbon.nesbot.com/) instance for better and further handling.

### Request - Available methods and fields

[](#request---available-methods-and-fields)

Depending if you want to send a *simple* or *qualified* request please see what parameters need to be set:

Field nameDescriptionSimple requestQualified requestMethod nameOwn VAT IDYour German VAT IDxxsetOwnUstId, *alias*: setUstId1Foreign VAT IDThe requested VAT IDxxsetForeignUstId, *alias*: setUstId2Company nameName of the requested companyxsetCompanyNameCityCity of the requested companyxsetCityNameZip codeZip code of the req. companyoptionalsetZipCodeStreetStreet of the req. companyoptionalsetStreetPrint conf.Official confirmation msgoptionalsetPrintConfirmation### Response - Available methods and fields

[](#response---available-methods-and-fields)

Additionally to the response field the response returns the following fields:

Field nameDescriptionMethod nameError Code[See avail. error codes](resources/lang/en/messages.php)getErrorCodeError Message[See avail. error messages](resources/lang/en/messages.php)getErrorMessageDateDate of the requestgetDateTimeTime of the requestgetTimeValid fromStart date of validity of the foreign VAT ID. Only filled with error code 203 and 204.getValidFromValid untilEnd date of validity of the foreign VAT ID. Only filled with error code 204.getValidUntilErg\_NameResult for the requested company namegetResponseCompanyErg\_CityResult for the requested company citygetResponseCityErg\_StreetResult for the requested company streetgetResponseStreetErg\_PLZResult for the requested company zip codegetResponseZipCodeEach of these result fields can have one of the following results:

ResultDescriptionAMatches the requested valueBDoes not match the requested valueCNot requestedDNot provided by EU member state

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3613d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4409904?v=4)[codedge](/maintainers/codedge)[@codedge](https://github.com/codedge)

---

Top Contributors

[![codedge](https://avatars.githubusercontent.com/u/4409904?v=4)](https://github.com/codedge "codedge (34 commits)")

---

Tags

laravelvalidationvatvat numberevatrvat no.

### Embed Badge

![Health badge](/badges/codedge-laravel-bzst-evatr/health.svg)

```
[![Health](https://phpackages.com/badges/codedge-laravel-bzst-evatr/health.svg)](https://phpackages.com/packages/codedge-laravel-bzst-evatr)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
