---
title: "NIF on Shopify: where to collect it for invoices | Vokzar"
description: "Shopify has no tax number field. Address 2, company field, cart or checkout extension: what each option solves, where it fails and what to do when it is wrong."
url: "https://vokzar.com/en/blog/nif-tax-number-shopify-invoice/"
folder: "/en/blog/"
lang: "en"
dateModified: "2026-11-07"
timestamp: 1794009600
---

[← Back to blog](https://vokzar.com/en/blog/) Invoicing · 8 min · 2026-11-07

# Tax number (NIF) on Shopify: where to store it so invoicing does not fail

Shopify has no tax number field. Address 2, company field, cart or checkout extension: what each option solves, where it fails and what to do when it is wrong.

NIF Shopify checkout Invoicing Shopify Plus Final consumer

Summary

## What matters before moving forward.

- Shopify checkout has no field for the Portuguese tax number (NIF). Every Portuguese store solves this with a workaround, and the workaround decides how many invoices fail.
- Address 2 is the most used option and the most fragile: browsers autofill it and many customers type their floor or door there.
- A NIF field inside checkout, in the information and shipping steps, is only possible on Shopify Plus. Server side validation through a public app with validation functions, however, works on any plan and can block a purchase with an invalid NIF.
- Asking for the NIF in the cart, before checkout, works on any plan, but customers buying with Shop Pay or a quick buy button skip that step.
- No option removes the need for validation. A NIF has 9 digits and a check digit; checking it before issuing avoids a credit note later.

## Why the NIF is a problem on Shopify

Shopify was designed for markets where the consumer's tax number rarely appears on the invoice. In Portugal many customers want the invoice with their NIF, either for income tax deductions or because they buy for a company.

Because checkout has no such field, every store invents a solution. The problem is not that there are several solutions, it is that most were not designed for the moment the invoice is issued automatically. A NIF typed wrong is only discovered after the invoice is out, and a certified invoice cannot be edited.

## Option 1: Address 2

This is the most common solution. The Address 2 field is renamed or explained in checkout and the customer types the NIF there. Several Portuguese invoicing integrations read the NIF from this field.

It works on any plan and needs no development, but it is fragile. The field exists for floor, door or flat, and many customers use it for that. Browsers autofill it with old addresses. And the same field goes onto the carrier label, which means the NIF is printed on the box.

Public reviews of the TOConline app for Shopify describe exactly this failure: when the field is filled wrongly or autofilled, automatic invoicing fails.

## Option 2: the company field

Shopify checkout can show a Company field in the address. Some stores ask for the NIF there, others use it for the company name and look for the NIF elsewhere.

It is less fragile than Address 2, because private customers usually leave it empty. But it mixes two concepts: someone buying for a company will type the company name, not the NIF, and the integration does not know what it read. It also appears on the shipping label.

## Option 3: a field in the cart

On any plan you can add a field to the cart page, stored as an order attribute. It is the right place from a data point of view: its own field, named NIF, that does not go onto the label.

The weak point is the journey. Customers who buy with a quick buy button, with Shop Pay or straight from the product page may never see the cart page. For them, the NIF simply does not exist.

## Option 4: field and validation at checkout

Checkout extensions let you add a NIF field inside checkout itself. But extensions in the information, shipping and payment steps are only available to stores on Shopify Plus.

Validation is a different story. According to Shopify's documentation, validation functions in public App Store apps work on any plan; only custom apps with functions require Plus. A validation function runs on the server and can stop the purchase from completing when the collected value, for example in Address 2 or a cart attribute, is not a valid NIF.

For stores outside Plus, the most robust combination is therefore: collect the NIF in an existing field or in the cart and validate it with a public app before the customer pays, with clear rules for customers who do not want an invoice with a NIF.

## Validate before issuing

Whatever the field, the integration should not trust the value as it arrives. A Portuguese NIF has 9 digits and the last one is a check digit calculated from the others. A simple check catches most typing errors before the invoice is issued.

Before validating, clean the value: remove spaces, dots and the PT prefix. Then decide what to do when the NIF is invalid. There are two reasonable options: issue to a final consumer, or put the order in a review list and contact the customer. The worst option is the most common: let the integration fail without telling anyone.

This decision is both commercial and fiscal. Agree it with your accountant and write it down, so the integration applies it the same way every time.

## How Vokzar handles the NIF in your store

We choose with you the collection field that fits your plan and your buying journey, and keep the NIF off the label where possible.

In the invoicing integration, the NIF is cleaned, validated by its check digit and only then sent. Invalid NIFs follow the rule you agreed with your accountant, and every exception is logged with the reason.

The result is fewer credit notes for wrong NIFs and an accountant who receives correct invoices the first time.

Related next steps

## Next steps.

- ### Automatic invoicing

Certified invoices with the NIF validated before issuing.
- ### Shopify and TOConline

Why automatic invoicing fails and how to build a reliable flow.
- ### Duplicate or missing invoices

Causes and fixes for the most common failures.

Proof and validation

- The Shopify Plus restriction for checkout extensions and the availability of validation functions in public apps come from Shopify's official documentation.
- The Address 2 failure is described in public reviews of the TOConline Invoices app.
- How invalid NIFs are handled should be agreed with your accountant.

Official documentation

## Validated sources.

Technical strategy should be auditable. These sources link directly to the official documentation behind this guide.

- Shopify

### Shopify: checkout UI extensions
- Shopify

### Shopify: Shopify Functions and plan availability
- Shopify App Store

### TOConline Invoices app reviews
- Shopify

### Shopify Admin API: Order object

Frequently asked questions

## Common questions about this topic.

[Fix the NIF in my invoicing](https://vokzar.com/en/automations-integrations/automatic-invoicing/#pedir) [Read in Portuguese](https://vokzar.com/blog/nif-shopify-fatura/)

## Want to apply this to your site?

Next step Technical audit

[Fix the NIF in my invoicing](https://vokzar.com/en/automations-integrations/automatic-invoicing/#pedir)

## Frequently asked questions

**Does Shopify have a NIF field at checkout?**

No. Portuguese stores use Address 2, the Company field, a field in the cart or, on Shopify Plus, a checkout extension.

**Can I validate the NIF at checkout without Shopify Plus?**

Yes, with a public app using validation functions, which work on any plan. What requires Plus is adding a new field in the information and shipping steps of checkout.

**Why does using Address 2 for the NIF cause problems?**

The field is used for floor and door, is autofilled by the browser and goes onto the shipping label. A wrong value makes automatic invoicing fail or go out with wrong data.

**What do I do when the customer's NIF is invalid?**

Agree a rule with your accountant: issue to a final consumer, or review the order and contact the customer. What matters is that the integration does not fail silently.
