Filling in company details from the VAT number

A business customer enters their VAT number at checkout, and the shop fills in the company name and address from official registers.

⏱ 5 minBeginnerUpdated 8 Oct 2026

A business customer enters their tax number (Slovenian) or OIB (the Croatian personal identification number) at checkout. The shop checks it in official registers and fills in the company name, street, postcode and town by itself. The customer types less, and you get the correct company name on the invoice without needing to correct it.

What the customer sees

When they fill in the tax number field at checkout and move on (or click the Get company data button), the message Fetching company data… appears below the field, followed by Company data filled in from the register. The fields are filled in, and the customer can still correct them. If the number is not in the registers, the message says This number was not found in the company register. Please fill the fields in yourself. and the customer enters the details by hand. The purchase is never blocked.

Which registers answer

CountrySourceWhat it covers
Sloveniathe Slovenian register of taxpayersall companies and sole traders, including those not registered for VAT
all EU countriesthe European VIES systemonly VAT-registered businesses; the only source outside Slovenia and Croatia
Croatiathe court registercompanies, including those under the VAT threshold; it does not include tradespeople and has no postcodes

The registers are asked in turn, and the first answer counts. When the Croatian court register answers, the customer sees Company data filled in. This register keeps no postcode, so please add it yourself.

Settings

Stores › Configuration › Magelan › VAT lookup

  1. In the General group, Enabled is set to Yes.

  2. Lookup trigger sets when the details are looked up: Automatically (on field blur) as soon as the customer leaves the field, Button next to the VAT field only when the button is clicked, or Both (blur + button). We recommend both.

  3. Setting Overwrite existing values to Yes means the register data replaces whatever the customer has already typed. With No, only empty fields are filled in.

  4. Allowed countries: the countries to look up, SI,HR by default.

  5. In the Registers group, Company name to use is set to Full legal name (as it belongs on an invoice) or Short name; each option shows an example name. For the Croatian register, make the same choice in Croatian company name to use; the default there is the short name, because the full one is very long.

  6. Click Save Config.

The Sudreg Client ID and Sudreg Client Secret fields are the access details for the Croatian register; we set them up for you, so do not change them.

The address from the register is the company's registered office. If the customer wants delivery elsewhere, they enter a separate shipping address, as at any checkout.

Common problems

The customer says nothing happens with their number

They have probably entered the number with spaces, or with a prefix that is not in the list of allowed countries. Check that the right country is selected. If everything is correct, send us the number and we will repeat the lookup.

It says the service is currently unavailable

The register is not responding. This happens mainly with the European VIES system, which is unavailable from time to time. The customer fills in the fields by hand, and the purchase continues.

It says there have been too many lookups

Only a limited number of lookups per hour are allowed from one network, to stop bots from misusing it. The customer should try again later or enter the details by hand.

Was this article helpful?

Related