Hi elgreco,
Based on the Order object definition in the Admin API (2026-01), here is some insight into the behavior you are seeing:
1. Regarding taxExempt returning false
The taxExempt field definition states:
“Whether taxes are exempt on the order. Returns true for orders where the customer or business has a valid tax exemption… Use this to understand if tax calculations were skipped during checkout.”
If this returns false, it means the order itself was not marked as explicitly exempt from tax calculation logic during checkout. Even if the customer has a Tax ID, Shopify often handles VAT/Tax exemptions (like EU Reverse Charge) by applying a 0% tax rate rather than setting the global taxExempt flag to true.
Recommendation:
Instead of relying solely on taxExempt, check the taxLines field.
- taxLines: “A list of all tax lines applied to line items on the order… Tax line prices represent the total price for all tax lines with the same rate and title.”
If the customer provided a VAT ID, you will likely see taxExempt: false, but inside taxLines, you should see an entry with a rate of 0.0 (or similar), indicating that tax was calculated but resulted in zero due to the VAT ID.
2. Retrieving the Customer VAT ID
There is no direct top-level field for “VAT ID” or “Tax ID” on the Order object. However, based on the schema, you should check the following locations within the Order query:
A. customAttributes
This is the most common location for tax identifiers collected at checkout.
Description: “A list of additional information that has been attached to the order.”
Type: [Attribute!]
Query this field and look for a key such as “VAT Number”, “Tax ID”, or “VAT” (depending on your specific checkout configuration or region).
B. metafields
If your store uses a third-party tax app or custom fields to store this data, it will be found here.
Description: “A list of custom fields that a merchant associates with a Shopify resource.”
C. billingAddress
While the text provided doesn’t expand the MailingAddress object, the Order object contains a billingAddress field. In some regions, the VAT ID is stored as part of the address fields (often mapped to company or a specific address attribute).
Sample Query to Debug:
codeGraphql
query {
order(id: "gid://shopify/Order/12380534047052") {
taxExempt
taxLines {
title
rate
priceSet { shopMoney { amount } }
}
customAttributes {
key
value
}
billingAddress {
company
# specific VAT fields would be inside the Address object
}
}
}
Hope this helps clarify how the API structures this data!