定制 quicreatdev/vatflow-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

quicreatdev/vatflow-php

Composer 安装命令:

composer require quicreatdev/vatflow-php

包简介

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

README 文档

README

The official PHP client for the 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

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

Installation

You can install the package via Composer:

composer require quicreatdev/vatflow-php

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

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

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

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

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

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

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

This project is licensed under the MIT License.

quicreatdev/vatflow-php 适用场景与选型建议

quicreatdev/vatflow-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 quicreatdev/vatflow-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 quicreatdev/vatflow-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 quicreatdev/vatflow-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 28
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-01