PHPackages                             quicreatdev/vatflow-php - 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. [API Development](/categories/api)
4. /
5. quicreatdev/vatflow-php

ActiveLibrary[API Development](/categories/api)

quicreatdev/vatflow-php
=======================

Official PHP wrapper for the VatFlow API (EU VAT validation &amp; monitoring)

v1.0.4(2mo ago)04MITPHP

Since Mar 1Pushed 2mo agoCompare

[ Source](https://github.com/Baptiste-Pignol/vatflow-php)[ Packagist](https://packagist.org/packages/quicreatdev/vatflow-php)[ RSS](/packages/quicreatdev-vatflow-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

VatFlow PHP SDK
===============

[](#vatflow-php-sdk)

The official PHP client for the [VatFlow - EU VAT &amp; Company Monitor](https://rapidapi.com/BaptistePignol/api/vatflow-eu-vat-company-monitor) API on RapidAPI.

VatFlow allows you to instantly validate European VAT numbers via VIES, enrich French company profiles (financials, executives, UBOs), and set up webhooks to monitor businesses for critical status changes.

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Composer
- A RapidAPI account and API key

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

[](#installation)

You can install the package via Composer:

```
composer require quicreatdev/vatflow-php
```

Quick Start
-----------

[](#quick-start)

To use the API, you need your RapidAPI key. You can find it in your RapidAPI Studio dashboard after subscribing to the VatFlow API.

```
require 'vendor/autoload.php';

use VatFlow\VatFlowClient;

// Initialize the client
$client = new VatFlowClient('YOUR_RAPIDAPI_KEY');
```

Usage
-----

[](#usage)

All methods return a standard PHP array decoded from the JSON response. You can check the `success` key to determine if the API call was successful.

### 1. Validate and Enrich a VAT Number

[](#1-validate-and-enrich-a-vat-number)

The `validate` method checks a VAT number and retrieves the company data.

**Built-in Auto-Retry:** By default, this SDK includes a robust auto-retry mechanism. If the government server (VIES) or the network experiences a temporary failure (HTTP 5xx), the client will automatically wait and retry up to 3 times before failing.

```
$vatNumber = 'FR14652014051';
$maxCacheDays = 7; // Request data no older than 7 days (default)
$autoRetry = true; // Automatically retry on 5xx network errors (default)

$response = $client->validate($vatNumber, $maxCacheDays, $autoRetry);

if ($response['success']) {
    echo "Company Name: " . $response['data']['name'] . "\n";
    echo "Address: " . $response['data']['address'] . "\n";
    echo "Is Valid: " . ($response['data']['is_valid'] ? 'Yes' : 'No') . "\n";
} else {
    echo "Error: " . $response['error'];
}
```

### 2. Subscribe to Webhook Alerts

[](#2-subscribe-to-webhook-alerts)

Register a webhook URL to be notified proactively if a company's status or data changes.

```
$vatNumber = 'FR14652014051';
$webhookUrl = 'https://api.yourdomain.com/webhooks/vatflow';

$response = $client->subscribeWebhook($vatNumber, $webhookUrl);

if ($response['success']) {
    echo "Subscribed! Subscription ID: " . $response['data']['subscription_id'];
}
```

### 3. List Active Webhooks

[](#3-list-active-webhooks)

Retrieve a list of all VAT numbers you are currently monitoring.

```
$response = $client->listWebhooks();

if ($response['success']) {
    echo "You have " . $response['count'] . " active webhooks.\n";
    print_r($response['data']);
}
```

### 4. Delete a Webhook

[](#4-delete-a-webhook)

Unsubscribe from alerts for a specific VAT number.

```
$vatNumber = 'FR14652014051';
$subscriptionId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';

$response = $client->deleteWebhook($vatNumber, $subscriptionId);

if ($response['success']) {
    echo "Webhook successfully deleted.";
}
```

Error Handling
--------------

[](#error-handling)

The client handles JSON decoding and basic network exceptions. If a request fails at the API level (e.g., invalid VAT format, missing parameters, or exceeding your RapidAPI quota), the method will return an array with `success` set to `false` and an `error` message.

```
array(3) {
  ["success"] => bool(false)
  ["error"] => string(60) "The VAT number format is invalid for this country."
  ["status_code"] => int(400) // Provided for network or severe API errors
}
```

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance85

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

5

Last Release

78d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/489aac483a95881d7bb9c5d805b1f121b6c45f323ab4bf70d652f7d72a9af2fb?d=identicon)[Baptiste-Pignol](/maintainers/Baptiste-Pignol)

---

Top Contributors

[![Baptiste-Pignol](https://avatars.githubusercontent.com/u/5666709?v=4)](https://github.com/Baptiste-Pignol "Baptiste-Pignol (6 commits)")

### Embed Badge

![Health badge](/badges/quicreatdev-vatflow-php/health.svg)

```
[![Health](https://phpackages.com/badges/quicreatdev-vatflow-php/health.svg)](https://phpackages.com/packages/quicreatdev-vatflow-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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