Company invoices in a PrestaShop checkout: VAT number fields and the VIES check
Which VAT number and company fields PrestaShop offers for business customers, what the old vatnumber module did, what a VIES check tells you and what it does not, and how to collect invoice details in the checkout.
In short
- PrestaShop’s address form has fields for the company, the VAT number and an identification number. Which ones appear depends on the country’s address format.
- PrestaShop’s
vatnumbermodule is marked abandoned on Packagist since 2019; its README says maintenance moved to the Friends of Presta association. - VIES, run by the European Commission, tells you whether an EU VAT number is valid for cross-border trade. The data comes from national databases, which can be temporarily unavailable.
- A VIES result is a check, not a tax decision: keep a record of it, and ask your accountant how to invoice customers in other EU countries.
A business customer wants an invoice with their company name and VAT number. A consumer does not want to see any of those fields. A good checkout handles both without making either of them work harder. This article explains what PrestaShop offers for company invoices, what a VIES check is, and how to put the invoice details in the checkout.
What PrestaShop offers out of the box
PrestaShop stores the invoice details in the address, not in the customer account. The address form has fields for the Company, the VAT number and an Identification number. Which of them appear, and in what order, depends on each country’s settings under International > Locations > Countries: the Address format field and the option Do you need a tax identification number? The PrestaShop user guide notes that not every country needs, or even has, such a number for business.
When you enable B2B mode, the customer profile also gets company fields such as Company and SIRET. Those are details about the customer; the invoice still uses the address.
What the PrestaShop pages we read do not describe is any automatic check of the VAT number. A customer can type any value into the field.
The old vatnumber module
PrestaShop used to provide a module called vatnumber. Its README describes it as a module that “enables you to enter the intra-community VAT number when creating the address”, and notes that the company field must be filled in first.
Today the package is marked abandoned, with a last release in January 2019. The README says maintenance was taken over by the Friends of Presta association. If you use it, test it on your PrestaShop version before relying on it.
What a VIES check tells you
VIES is the European Commission’s tool for checking EU VAT numbers. According to the Your Europe portal:
- VIES is “a search engine (not a database)”: each check queries the national VAT database of the country that issued the number.
- A valid result means the VAT information exists and the business is registered to trade cross-border within the EU.
- An invalid result can mean the number does not exist, has not been activated for intra-EU transactions, or the registration is not finalised yet.
- National databases are sometimes unavailable, for example during backups. The portal advises waiting a few minutes and trying again.
- It recommends keeping track of your validations in case of a tax control.
A VIES result does not decide how to invoice. Whether an order to a business in another EU country is invoiced with or without VAT is a question for your accountant.
Putting invoice details in the checkout
These are the rules we follow for invoice details in a checkout:
- One switch. Consumers see a single option such as I want to receive an invoice. The company fields appear only when it is turned on.
- Only the fields the invoice needs. Company name, VAT number or tax ID, and an invoice address only if it differs from the delivery address.
- Country-specific numbers. Some countries use a separate tax code on invoices, such as the Italian Codice Fiscale or the Spanish DNI, NIE or CIF. Ask for them only for those countries, with a format check.
- Check while typing, never block on an outage. Show whether the VIES check found the number, and if VIES is down, say so instead of rejecting a number that may be valid.
- Keep the data visible in the back office, next to the order, so whoever issues the invoice does not have to look for it.
This is how invoice details work in Prime OPC. The customer turns on the invoice switch and enters the company name, the tax ID or VAT number and a separate invoice address if needed. EU VAT numbers are checked against VIES as they are typed, with three possible messages: valid, not found, or service unavailable. Italian and Spanish addresses get their own tax code fields with a format check, and the invoice data appears in a card on the order page in the back office.
Questions and answers
Does PrestaShop check EU VAT numbers?
The PrestaShop pages we read for this article describe a VAT number field in the address, but no automatic VIES check. The old vatnumber module, which added the field when creating an address, is marked abandoned on Packagist. A check at checkout needs a module.
What does a VIES check confirm?
According to the European Commission’s Your Europe portal, VIES shows whether an EU VAT number is valid, which tells you if a business is registered to trade cross-border within the EU. An invalid result can mean the number does not exist, is not activated for intra-EU transactions or is not yet registered.
What should the checkout do when VIES is unavailable?
VIES queries national databases, which are sometimes down for maintenance. The Your Europe portal advises trying again a few minutes later. In a checkout, it is better to tell the customer the service is unavailable than to reject a number that may be valid.
Where should the invoice details go in a one page checkout?
Behind one switch, so that consumers do not see company fields they do not need. When the customer turns it on, ask for the company name, the VAT number or tax ID and the invoice address if it differs from the delivery address.