---
title: "ViesVerifier – API-Referenz · Quittio"
description: "VAT identifier check via the REST interface of the EU VIES service."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility/ViesVerifier"
locale: de
meta:
  "og:description": "VAT identifier check via the REST interface of the EU VIES service."
  "og:image": "https://quittio.dev/og/quittio-de.jpg"
  "og:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "ViesVerifier – API-Referenz · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-de.jpg"
  "twitter:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

[API reference](https://quittio.dev/docs/api) / [Quittio](https://quittio.dev/docs/api/Quittio) \\ [Core](https://quittio.dev/docs/api/Quittio/Core) \\ [Validation](https://quittio.dev/docs/api/Quittio/Core/Validation) \\ [Plausibility](https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility)

# ViesVerifier

final class in quittio/core · implements [`VatIdVerifier`](https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility/VatIdVerifier)

`Quittio\Core\Validation\Plausibility\ViesVerifier` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/core/src/Validation/Plausibility/ViesVerifier.php#L18)

VAT identifier check via the REST interface of the EU VIES service.

Only identifiers of the EU member states (Greece: "EL") and of Northern Ireland ("XI") are sent to VIES; others are reported as not supported. Only the answers VALID and INVALID count as a result and are cached. Errors (INVALID\_INPUT, MS\_UNAVAILABLE, TIMEOUT, …) and unreachable services give $valid = null, are not cached and never block validation.

## Constants \#

| Constant | Value | Description |
| --- | --- | --- |
| `ENDPOINT` | `'https://ec.europa.eu/taxation_customs/vies/rest-api/ms/%s/vat/%s'` | |
| `PREFIXES` | `['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK …` | |

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `::supports()` | Whether VIES can check the VAT identifier (EU member state prefix incl. "EL", or "XI"). |
| `->verify()` | |

### `__construct()`#

```
public function __construct(
    int $timeout = 5,
    int $cacheTtl = 86400,
    (Closure(string, int): ?string)|null $http = null,
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$timeout` | `int` = `5` | |
| `$cacheTtl` | `int` = `86400` | |
| `$http` | `(Closure(string, int): ?string)\|null` = `null` | returns the response body or null on failure |

### `supports()`#

```
public static function supports(string $vatId): bool
```

static

Whether VIES can check the VAT identifier (EU member state prefix incl. "EL", or "XI").

| Parameter | Type | Description |
| --- | --- | --- |
| `$vatId` | `string` | |

<dl><dt>Returns</dt>
<dd><code>bool</code></dd>
</dl>

### `verify()`#

```
public function verify(string $vatId): VatIdVerification
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$vatId` | `string` | |

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility/VatIdVerification">VatIdVerification</a></code></dd>
</dl>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/#website","@type":"WebSite","description":"E-Rechnungen für PHP und Laravel: ZUGFeRD, XRechnung und Peppol erstellen, prüfen, lesen und archivieren.","inLanguage":"de-DE","name":"Quittio","url":"https://quittio.dev/","publisher":{"@id":"https://quittio.dev/#identity"},"workTranslation":{"@id":"https://quittio.dev/en#website"}},{"@id":"https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility/ViesVerifier#webpage","@type":"WebPage","description":"VAT identifier check via the REST interface of the EU VIES service.","name":"ViesVerifier – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility/ViesVerifier","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Validation/Plausibility/ViesVerifier"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"de-DE","url":"https://quittio.dev/logo.png"}]}
```