PHPackages                             malek83/polish-vat-payer - 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. malek83/polish-vat-payer

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

malek83/polish-vat-payer
========================

Library using Polish Ministry of Finance WebService to validate if given VAT Number is registered as VAT Tax Payer in Poland

3.0.0(6y ago)12.5kMITPHPPHP &gt;=7.1.3CI failing

Since Jul 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/malek83/polish-vat-payer)[ Packagist](https://packagist.org/packages/malek83/polish-vat-payer)[ RSS](/packages/malek83-polish-vat-payer/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/3c3ad0038d686bdf2152b59eb9b979c2b1f2fec96d87fe83190ed71ffe0c1cce/68747470733a2f2f7472617669732d63692e6f72672f6d616c656b38332f706f6c6973682d7661742d70617965722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/malek83/polish-vat-payer)

Polish VAT Payer
================

[](#polish-vat-payer)

Simple library using Polish Ministry of Finance WebService to validate if given VAT Number is registered as VAT Tax Payer in Poland.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
- [Roadmap](#roadmap)
- [Changelog](#changelog)
- [License](#license)

Installation
------------

[](#installation)

This library is available on [Packagist](http://packagist.org/packages/malek83/polish-vat-payer):

```
$ composer require malek83/polish-vat-payer
```

Usage
-----

[](#usage)

There are two easy ways to use this library:

### to get the boolean result of verification

[](#to-get-the-boolean-result-of-verification)

```
use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()->build();

$bool = $validator->isValid('1568255600'); //returns boolean
```

### to get the Full Response Object, containing all needed information

[](#to-get-the-full-response-object-containing-all-needed-information)

```
use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()->build();

/** @var \Malek83\PolishVatPayer\Result\PolishVatNumberVerificationResult $result */
$result = $validator->validate('1234567890');

var_dump($result->isValid()); // gives boolean, true if company is VAT Payer, otherwise false
var_dump($result->getVatNumber()); //gives string, the verificated VAT number
var_dump($result->getMessage()); //gives string, the human readable message
```

### Request cache

[](#request-cache)

Request cache can be used if necessary. Any PSR-16 Compatible component can be used (i.e. symfony/cache)

By default cache is turned off. To use cache call the setter method during building the facade

```
use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()
    ->setCache(new AnyPsr16CompatibleCache())
    ->setTtl(new DateInterval('PT1H'))
    ->build();
```

Default TTL is 1 hour. It can be also overriden while during the build process.

### Request Log

[](#request-log)

Request log can be defined also. It's PSR-3 Compatible (i.e. Monolog)

By default it's turned off, to turn it on simply call `setLogger` while building:

```
use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()
    ->setLogger(new AnyPsr3CompatibleLogger())
    ->build();
```

Roadmap
-------

[](#roadmap)

All future features are listed in [Roadmap GitHub project](https://github.com/malek83/polish-vat-payer/projects/1).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) file for more information what has changed recently.

Local environment for development &amp; testing
-----------------------------------------------

[](#local-environment-for-development--testing)

```
$ docker build -t polish-vat-payer ./docker/

$ docker run -d --name polish-vat-payer --volume ${PWD}:/source polish-vat-payer
```

License
-------

[](#license)

The MIT License (MIT). Please see [License](LICENSE) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity61

Established project with proven stability

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 ~128 days

Total

4

Last Release

2526d ago

Major Versions

1.0.1 → 2.0.02018-07-20

2.0.0 → 3.0.02019-07-31

PHP version history (3 changes)1.0.0PHP &gt;=5.6.0

1.0.1PHP &gt;=5.5.0

3.0.0PHP &gt;=7.1.3

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/malek83-polish-vat-payer/health.svg)

```
[![Health](https://phpackages.com/badges/malek83-polish-vat-payer/health.svg)](https://phpackages.com/packages/malek83-polish-vat-payer)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M145](/packages/algolia-algoliasearch-client-php)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)

PHPackages © 2026

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