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
| Country | Source | What it covers |
|---|---|---|
| Slovenia | the Slovenian register of taxpayers | all companies and sole traders, including those not registered for VAT |
| all EU countries | the European VIES system | only VAT-registered businesses; the only source outside Slovenia and Croatia |
| Croatia | the court register | companies, 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
In the General group, Enabled is set to Yes.
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.
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.
Allowed countries: the countries to look up,
SI,HRby default.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.
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.
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.


