Download the PHP package rechtlogisch/evatr without Composer

On this page you can find all versions of the php package rechtlogisch/evatr. 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 evatr

Latest Version on Packagist Tests codecov Total Downloads

evatr

Checks a VAT-ID using the eVatR REST-API of the German Federal Central Tax Office (Bundeszentralamt für Steuern, BZSt)

[!CAUTION] This package is in early development and is not yet ready for production use. It is currently being tested and may undergo significant changes.

[!IMPORTANT] This is an unofficial wrapper for the eVatR API. For official documentation and terms of use, please refer to the German Federal Central Tax Office (BZSt) website.

[!NOTE] This package uses the new REST-API released in July 2025. The old XML-RPC API is being discontinued and will be sunset on November 30th, 2025 (based on information from BZSt-Newsletter USTKV 01/2025 dated July 1st, 2025).

Installation

You can install the package via composer:

Quick Start

Simple Validation

Validates only the VAT-ID without company data verification:

or alternatively use the helper function:

Qualified Confirmation

Validates VAT-ID and verifies company data:

or alternatively use the helper function:

Including Raw Response

or with helper functions

API Reference

Constructor

or alternatively using RequestDto:

Methods

check(): ResultDto

Performs the VAT-ID confirmation:

includeRaw(bool $value = true): self

Includes the raw API response in the result:

Response Object (ResultDto)

The check() method returns a ResultDto object with the following methods:

Status Codes

The API returns various status codes via the Status enum. All status codes are available as enum cases:

Validation Results (Qualified Confirmation)

For qualified confirmations, the response includes validation results for each field via the QualifiedResult enum:

Helper Functions

The package provides convenient helper functions:

checkVatId()

confirmVatId()

Field Mapping

The API uses German terms, which have been mapped to parameters:

Request

BZSt API evatr
anfragendeUstid vatIdOwn
angefragteUstid vatIdForeign
firmenname company
ort location
strasse street
plz zip

Response

BZSt API evatr
id id
anfrageZeitpunkt timestamp
gueltigAb dateFrom
gueltigBis dateTill
ergFirmenname company
ergStrasse street
ergPlz zip
ergOrt location

Language of status messages (EVATR_LANG)

By default, status messages (human-readable descriptions of evatr-* codes) are returned in German. To switch to English messages, set the following environment variable:

[!WARNING] This English translation of the status messages is unofficial. Use at your own risk.

Supported values:

This affects:

Additional endpoints and helpers

The client exposes supplementary endpoints of the eVatR API.

Status messages

Each StatusMessage item has the shape:

EU member states availability

Error Handling

All public API methods throw exceptions on failure, and return only DTOs on success.

ErrorResponse exception

Thrown when a request fails due to transport or response parsing issues.

Fields:

Example:

Testing

Running Tests

Test Data

The library includes test VAT-IDs that can be used for development and testing:

Environment Variables

For testing with real VAT-IDs, you can set environment variables:

Rate Limits and Best Practices

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of evatr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.9
vlucas/phpdotenv Version ^5.6
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 rechtlogisch/evatr contains the following files

Loading the files please wait ...