I got tired of the official EU VAT API crashing, so I built a Serverless wrapper with Webhooks 🚀

Published: (March 3, 2026 at 07:59 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Cover image for I got tired of the official EU VAT API crashing, so I built a Serverless wrapper with Webhooks 🚀

Introduction

Hello DEV community! 👋

If you’ve ever built a B2B SaaS or an e‑commerce checkout in Europe, you know the struggle. By law, you have to validate your customers’ VAT numbers to apply the reverse‑charge mechanism.

The official way to do this is via the European Commission’s VIES API. But there are a few huge problems with it:

  • It frequently crashes or rate‑limits you during business hours.
  • It’s incredibly slow.
  • The biggest issue: it only tells you the status today. If your biggest client goes bankrupt or closes next month, you won’t know until the unpaid invoices pile up.

I wanted a modern, fast, and proactive solution. So, I built VatFlow.

🛠 What I built

VatFlow is a REST API hosted on RapidAPI that acts as a smart shield and monitor for B2B company data.

⚡️ Smart Caching

A DynamoDB caching layer returns a recently‑checked VAT number in milliseconds, eliminating VIES downtime impact on your checkout flow.

🔔 Real‑time Webhooks

Subscribe to a VAT number. Every night a serverless cron job checks the company’s status; if they close down or change their address, your server receives a POST request instantly.

🇫🇷 Deep Enrichment (France)

For French companies, the API automatically enriches VIES data with financial data (revenue, net income) and executives’ names using local Open Data.

🏗 The Tech Stack (100% Serverless)

  • API Gateway & AWS Lambda (Node.js) – endpoints.
  • DynamoDB – lightning‑fast caching and webhook subscriptions storage.
  • DynamoDB Streams & EventBridge – detect data changes and automatically trigger the webhook dispatcher.

💻 Developer Experience First

Two official, zero‑dependency wrappers with built‑in auto‑retry mechanisms are available.

For Node.js (npm)

npm install vatflow
const VatFlowClient = require('vatflow');
const client = new VatFlowClient('YOUR_RAPIDAPI_KEY');

// Validate a VAT number in one line
const result = await client.validate('FR14652014051');
console.log(result.data.name);

For PHP (Composer)

composer require quicreatdev/vatflow-php

🎁 Try it out!

The API is published on RapidAPI with a Free Tier so you can test it without a credit card.

👉 Check out VatFlow on RapidAPI here

I would love to hear your feedback on the architecture, the developer experience, or the RapidAPI integration. Have you ever struggled with the VIES API before? Let me know in the comments! 👇

0 views
Back to Blog

Related posts

Read more »

Google Gemini Writing Challenge

What I Built - Where Gemini fit in - Used Gemini’s multimodal capabilities to let users upload screenshots of notes, diagrams, or code snippets. - Gemini gener...