Magento 2
Wat het doet
Sectie “Wat het doet”Btw-, postcode- en straatopzoekingen zijn gratis en hebben geen sleutel nodig. De optionele KvK-opzoeking vraagt uw eigen KvK API-abonnement, gefactureerd door de KvK (ongeveer € 6,20 per maand in oktober 2026; het optionele volledige adres kost ongeveer € 0,02 per opvraging).
Verkoopt u aan Nederlandse en Belgische bedrijven? Laat ze een btw-nummer typen en de rest vult zichzelf in.
De extensie controleert het btw-nummer zoals klanten het echt typen (met of zonder landcode, spaties of punten), eerst offline en daarna in VIES, het Europese btw-register. Voor Nederlandse en Belgische bedrijven vult ze de geregistreerde bedrijfsnaam en het adres in. Nederlandse adressen komen uit postcode + huisnummer (PDOK, het adresregister van de overheid); Belgische straten worden voorgesteld vanaf de postcode (BeST), in het Nederlands of Frans.
Klanten worden nooit gestraft voor een trage overheidsdienst: als VIES niet werkt, gaat de bestelling door en wordt het nummer voor u gemarkeerd. Niets wat de klant typte wordt zonder vragen overschreven en elk ingevuld veld blijft aanpasbaar. Magento’s eigen btw-validatie (automatische klantgroepen) gebruikt dezelfde controle, zodat een VIES-storing een klant niet meer in de verkeerde groep zet.
Voor Nederlandse B2B-winkels zoekt de extensie ook het KvK-nummer op, met uw eigen KvK API-sleutel. Probeer het eerst gratis in de testomgeving van de KvK.
In de admin ziet u de btw- en KvK-status bij elke klant en bestelling, een opzoeklog die elke opzoeking in gewone woorden uitlegt, een knop “Test connection” per bron en de KvK-opvragingen van de maand.
Werkt bij registratie, in het adresboek en in de checkout (ook als gast), op Luma en op het gratis Hyvä-thema.
Kenmerken
Sectie “Kenmerken”- Btw-controle in VIES voor alle EU-landen, eerst offline controlegetal (ook NL-nummers na 2020)
- Bedrijfsnaam en adres automatisch uit VIES voor NL en BE
- Gratis Nederlandse postcode + huisnummer (PDOK), met keuze uit toevoegingen en handmatige invoer
- Gratis Belgische straatsuggesties en adrescontrole (BeST), Nederlandse/Franse straatnamen, provincie uit de postcode
- Optioneel KvK-opzoeking met uw eigen sleutel; gratis testomgeving
- Blokkeert de checkout nooit als VIES niet werkt: accepteren en markeren (of “niet geregistreerd” weigeren)
- Magento’s btw-validatie en klantgroepen gebruiken dezelfde controle: een storing is nooit “ongeldig”
- Btw-/KvK-status, datum, bron en VIES-verzoeknummer bij klant, adres en bestelling
- Opzoeklog met filters en redenen in gewone taal; verbindingstest per bron; KvK-teller
- “Copy diagnostics” voor snelle support, zonder sleutels of klantnummers
- Controle op de server bij elke opgeslagen klant en elk adres en bij elke bestelling
- Luma en het gratis Hyvä-thema (met de Luma-checkout van Hyvä)
- Toegankelijk: suggestielijsten met het toetsenbord te bedienen, geen voorbarige foutmeldingen
- Winkel in het Nederlands, Frans, Duits en Engels
- Instellingen per website en winkelweergave
- Geen licentiesleutel, geen phone-home, geen afgeschermde functies
Prijs
Sectie “Prijs”- Zonder KvK:
{PRICE_BASE}(alleen als de eigenaar een basisversie aanbiedt; P-13 kiest liever één product) - Met KvK-opzoeking (de hele extensie):
{PRICE_WITH_KVK} - Updates en support:
{SUPPORT_UPDATE_WINDOW}
Eén aankoop dekt de hele extensie, ook de KvK-opzoeking; er is geen licentiesleutel en geen afgeschermde functie. Geen gratis proefperiode: de terugbetalingsregels van de Adobe Commerce Marketplace gelden (P-15). Optie A eenmalig + jaarlijkse verlenging, optie B Marketplace-abonnement: de eigenaar kiest bij het aanbieden.
Systeemeisen
Sectie “Systeemeisen”Dit deel is alleen in het Engels beschikbaar.
| Item | Supported |
|---|---|
| Magento Open Source | 2.4.7 (tested 2.4.7-p10), 2.4.8 (tested 2.4.8-p5), 2.4.9 |
| Mage-OS | 3.6.0 |
| Adobe Commerce | same code base, not tested by us |
| PHP | 8.2, 8.3, 8.4 |
| Storefront theme | Luma; free Hyvä theme 1.5.3 with Hyvä’s Luma checkout fallback (hyva-themes/magento2-luma-checkout) |
| Not supported in 1.0 | Hyvä Checkout (Magewire), planned for 1.1; GraphQL lookups and headless storefronts |
| Storefront languages | English (en_US), Dutch (nl_NL), German (de_DE), French (fr_BE) |
| Network | outgoing HTTPS from your server to VIES, PDOK, BeST and (optional) KvK |
Installeren
Sectie “Installeren”Dit deel is alleen in het Engels beschikbaar.
Run the commands in your Magento root as the user that owns the files.
3.1 Get the package
Sectie “3.1 Get the package”From the Adobe Commerce Marketplace (uses your repo.magento.com access keys):
composer require codesaur/module-company-autofillOr from the zip file codesaur-module-company-autofill-1.0.0.zip: put it in a folder that stays on the server, register that folder as a Composer artifact repository and require the package:
composer config repositories.codesaur-autofill artifact /path/to/dir-with-zipcomposer require codesaur/module-company-autofill3.2 Enable and upgrade
Sectie “3.2 Enable and upgrade”bin/magento module:enable Codesaur_CompanyAutofillbin/magento setup:upgradeIn developer mode, run setup:upgrade without --keep-generated.
In production mode, compile and deploy the static files next (use the locales of your store views):
bin/magento setup:di:compilebin/magento setup:static-content:deploy nl_NL en_US de_DE fr_BEThen, in every mode:
bin/magento cache:flushDo not skip the static content step. Magento 2.4.7 and later protect the checkout scripts with integrity (SRI) hashes stored in sri-hashes.json. The extension adds to requirejs-config.js; with the old hashes the browser blocks that file and the checkout hangs on the loading spinner.
3.3 Hyvä shops
Sectie “3.3 Hyvä shops”- Run
bin/magento hyva:config:generate. It registers the extension’s Tailwind sources for your theme. - If your Hyvä theme is built from source, rebuild its CSS:
npm ci && npm run buildin the theme’sweb/tailwindfolder. Then deploy static content again in production mode. - Keep Hyvä’s Luma checkout fallback (
hyva-themes/magento2-luma-checkout) for the checkout. The extension works there like on Luma. Hyvä Checkout (Magewire) is not supported in version 1.0.
3.4 First steps after installing
Sectie “3.4 First steps after installing”- Open Stores > Configuration > codesaur > VAT & Company Autofill.
- In Connection test and support, click Test connection for VIES, PDOK and BeST. Each should show OK with a response time.
- To show the VAT field on the storefront, set Stores > Configuration > Customers > Customer Configuration > Create New Account Options > Show VAT Number on Storefront to Yes (a Magento setting).
- Optional: try KvK in the test environment (section 6).
3.5 Upgrade
Sectie “3.5 Upgrade”composer update codesaur/module-company-autofillbin/magento setup:upgradeThen, as in 3.2: production mode setup:di:compile and setup:static-content:deploy; cache:flush; on Hyvä 3.3.
Instellen
Sectie “Instellen”Dit deel is alleen in het Engels beschikbaar.
Stores > Configuration > codesaur > VAT & Company Autofill. Every setting can be set per website and per store view. The defaults work without any key.
4.1 VAT check and address lookup
Sectie “4.1 VAT check and address lookup”| Setting | What it does | Default |
|---|---|---|
| Check VAT numbers in VIES | Checks VAT numbers and fills company name and address. Also used by Magento’s own VAT validation. | Yes |
| When VIES says a number is not valid | Accept the order and flag the number, or Reject the number. An outage is never treated as “not valid”. | Accept and flag |
| Fields autofill may fill | Company, street and house number, postcode, city, country | all |
| Dutch postcode lookup (PDOK, free) | Postcode + house number gives street and city | Yes |
| Belgian address lookup (BeST, free) | Postcode gives street suggestions; address check | Yes |
| Ask for the business address at registration | Shows company, VAT number and address on the registration form | Yes |
| Check NL/BE postcode format | Rejects postcodes in an impossible format | Yes |
4.2 KvK (Dutch Chamber of Commerce)
Sectie “4.2 KvK (Dutch Chamber of Commerce)”| Setting | What it does | Default |
|---|---|---|
| KvK lookup | Off; Test environment (fictional companies); Production (your own API key) | Off |
| Your KvK API key | Shown in production mode. Stored encrypted; never shown again after saving. | empty |
| KvK number field | Automatic (optional when KvK lookup is on), Hidden, Optional, Required for companies | Automatic |
| Fetch the full address (Basisprofiel, about EUR 0.02 per lookup) | Off: free Zoeken lookup (name, street, city). On: also postcode and house number, paid per call on your KvK key. | No |
This group also shows the How to get a KvK API key guide and the KvK calls counter (section 6).
4.3 Abuse protection
Sectie “4.3 Abuse protection”| Setting | Default |
|---|---|
| Lookups per visitor (IP) per minute | 40 |
| Lookups per visitor (IP) per day | 1000 |
A visitor over the limit gets “too many lookups” (HTTP 429) until the minute or day is over. The visitor’s IP address is never stored, only a hash.
4.4 Lookup log
Sectie “4.4 Lookup log”| Setting | Default |
|---|---|
| Keep a lookup log | Yes |
| Keep log entries for (days, max 180) | 30 |
A daily cron job deletes older entries. Magento’s cron must run.
4.5 Advanced
Sectie “4.5 Advanced”Base URL per source (VIES, PDOK, BeST, KvK) and the request timeout. Leave the URLs empty to use the official services. Only change these when support asks you to.
4.6 Connection test and support
Sectie “4.6 Connection test and support”- Test connection: one button per source (VIES, PDOK, BeST, KvK). It uses the saved settings of the scope selected at the top of the page and bypasses the cache and the circuit breaker. It shows OK with the response time, or the failure in plain words. Save your settings before testing.
- Copy diagnostics: builds a support report, shows it in a text box and copies it to the clipboard (section 9).
5.1 Lookup log
Sectie “5.1 Lookup log”Reports > VAT & Company Autofill > Lookup log.
A grid of every lookup, newest first, with a filter on every column except the reason (Filters button above the grid).
| Column | Meaning |
|---|---|
| ID | the log entry number |
| Time | when the lookup ran (shown in the admin’s time zone) |
| Store view ID | the store view it ran in |
| Source | VIES, PDOK, BeST or KvK |
| Where | where the lookup ran: storefront (a form field), registration, account, address, order |
| Masked input | the number or postcode, partly hidden |
| Result | Valid, Not registered, Wrong format, Could not be checked (service busy or down), Found, Not found, Several matches |
| Error code | the technical code, for support |
| Reason | what happened, in plain words |
| From cache | Yes when the answer came from the cache, without a call |
Access is controlled by the ACL resource Lookup log (System > Permissions > User Roles).
5.2 Customer
Sectie “5.2 Customer”Customers > All Customers > edit, tab VAT & Company Autofill: VAT number, VAT status, checked at, source, VIES request ID, KvK number, KvK status, checked at. For each saved address: the same fields plus the address check.
5.3 Order
Sectie “5.3 Order”Sales > Orders > view, block VAT & Company Autofill in the order’s information section: the VAT status at order time, VAT number, checked at, source, VIES request ID, KvK number, KvK status and checked at, and the status of the billing address. These values are copied when the order is placed and do not change later.
5.4 VAT statuses
Sectie “5.4 VAT statuses”| Status | Meaning | Effect |
|---|---|---|
| Valid | VIES confirms the number | accepted |
| Not registered (invalid) | VIES says the number is not active | accepted and flagged, or rejected (your setting) |
| Wrong format | wrong length or check digits | rejected; no call is made |
| Could not be checked | VIES or the national register is busy or down | always accepted and flagged |
KvK: uw eigen API-sleutel
Sectie “KvK: uw eigen API-sleutel”De KvK staat geen gedeelde API-sleutel toe, en KvK-gegevens mogen niet tussen winkels worden doorgegeven. Daarom gebruikt de KvK-opzoeking uw eigen KvK API-sleutel, die u aanvraagt via het ontwikkelaarsportaal van de KvK (developers.kvk.nl). De gratis KvK-opzoeking (Zoeken) geeft bedrijfsnaam, straat en plaats, maar geen huisnummer en geen postcode. Voor het volledige adres zet u “Fetch the full address” aan (Basisprofiel, ongeveer € 0,02 per opvraging op uw eigen KvK-sleutel). De admin toont een maandelijkse KvK-teller, een stappenplan voor de sleutel en een testknop. Zonder sleutel blijft het KvK-veld verborgen; btw-, postcode- en straatopzoekingen werken gewoon. KvK-resultaten worden alleen in uw eigen winkel gecachet.
Wat uw klanten zien
Sectie “Wat uw klanten zien”Dit deel is alleen in het Engels beschikbaar.
- A VAT field (Magento’s own) with a check while they type. A valid NL or BE number fills company name and address.
- For the Netherlands: house number (and addition) fields next to the postcode; street and city are filled in.
- For Belgium: street suggestions after the postcode; the province is selected.
- An optional KvK number field (Netherlands).
- Messages appear only after the customer has typed something. A VIES outage shows that the check is paused; the customer can continue.
- Works on the registration form, the address book and the checkout (also as a guest).
Privacy
Sectie “Privacy”Gegevens gaan alleen naar de officiële bronnen: het btw-nummer naar VIES (Europese Commissie), postcode en huisnummer naar PDOK (Kadaster), postcode en straat naar BeST (Belgische federale overheid), het KvK-nummer naar de KvK met uw eigen sleutel. Er gaan geen gegevens naar codesaur. Alle opvragingen gaan vanaf uw winkelserver; de winkel laadt geen scripts van derden. Uw KvK-sleutel wordt versleuteld opgeslagen en nooit naar de browser gestuurd. De opzoeklog bewaart alleen gemaskeerde invoer, standaard 30 dagen (hooguit 180 dagen).
Support
Sectie “Support”Wij ondersteunen de extensie, niet uw hosting of serverinrichting. (We support the extension, not your hosting or server setup.) Stel uw vraag via het supportcontact op deze pagina. Klik in Stores > Configuration > codesaur > VAT & Company Autofill > Connection test and support op Copy diagnostics en plak de tekst in uw bericht: die toont de versies van extensie, Magento en PHP, het thema, de gezondheid van elke bron en de laatste mislukte opzoekingen (gemaskeerd); nooit API-sleutels, wachtwoorden of volledige klantnummers.
Problemen oplossen
Sectie “Problemen oplossen”- Checkout blijft hangen op het laadicoon na de installatie: voer
bin/magento setup:static-content:deployuit (productiemodus) ofbin/magento setup:upgradezonder--keep-generated(ontwikkelmodus), daarnabin/magento cache:flush. Magento 2.4.7+ blokkeert gewijzigde scripts met oude integriteitshashes. - Velden zonder opmaak op een Hyvä-thema dat u zelf bouwt: voer
bin/magento hyva:config:generateuit en bouw de CSS van het thema opnieuw. - “Btw-controle gepauzeerd” / “kon niet worden gecontroleerd”: VIES is druk of onbereikbaar. De klant gaat door; het nummer wordt geaccepteerd en gemarkeerd. Controleer met Test connection en de Lookup log.
- KvK vult geen huisnummer of postcode in: zet “Fetch the full address” aan (betaald per opvraging op uw KvK-sleutel).
- KvK-opzoeking werkt niet in productie: productie vraagt uw eigen KvK API-sleutel.
- “Te veel opzoekingen”: verhoog de limieten onder Abuse protection.
- Hyvä toont “Zip/Postal Code field is required” nadat de autofill het land wijzigde: dat is de eigen validatie van Hyvä; de melding verdwijnt zodra de postcode is ingevuld.
Verwijderen
Sectie “Verwijderen”Dit deel is alleen in het Engels beschikbaar.
Keep the data (default): bin/magento module:uninstall Codesaur_CompanyAutofill (Composer installs), or bin/magento module:disable Codesaur_CompanyAutofill. Statuses on customers and orders, the lookup log and the settings stay in the database.
Remove the data: bin/magento module:uninstall --remove-data Codesaur_CompanyAutofill. This drops the extension’s tables, columns, attributes, settings and cron entries. Make a database backup first.
After either, run bin/magento setup:upgrade and, in production mode, setup:di:compile and setup:static-content:deploy, then bin/magento cache:flush.
Veelgestelde vragen
Sectie “Veelgestelde vragen”Heb ik een API-sleutel nodig?
Sectie “Heb ik een API-sleutel nodig?”Nee. VIES, PDOK en BeST zijn gratis publieke diensten. Alleen de KvK-opzoeking heeft uw eigen KvK API-sleutel nodig; de testomgeving van de KvK werkt zonder.
Welke landen worden ondersteund?
Sectie “Welke landen worden ondersteund?”Nederland en België: btw-controle met het invullen van bedrijfsgegevens, Nederlandse postcode + huisnummer en Belgische straatsuggesties. De btw-controle zelf werkt voor elk Europees btw-nummer.
Wat gebeurt er als VIES onbereikbaar is?
Sectie “Wat gebeurt er als VIES onbereikbaar is?”De klant kan verder. De bestelling en de klant krijgen “kon niet worden gecontroleerd”, en u ziet dat bij de bestelling, bij de klant en in het opzoeklog.
Verandert het mijn btw-instellingen?
Sectie “Verandert het mijn btw-instellingen?”Alleen als u de btw-vrijstelling (verlegging) voor geldige zakelijke klanten in een ander EU-land aanzet. Die staat standaard uit. U bepaalt zelf de btw-behandeling van uw verkopen.
Worden de gegevens van mijn klanten naar codesaur gestuurd?
Sectie “Worden de gegevens van mijn klanten naar codesaur gestuurd?”Niet bij de plugins die u op uw eigen server installeert (Shopware, WooCommerce, Magento, PrestaShop): die praten rechtstreeks met de publieke diensten. De gehoste apps (Shopify, Lightspeed) draaien op onze server in de EU, als uw verwerker. Zie externe diensten en de privacyverklaring.