Storefront API, totalTax always 0

Highlighted
Excursionist
13 0 4

I've been working with the storefront API for a few days, and I can't seem to get the taxes to return anything but 0? My I've tried pulling both totalTax and totalTaxV2 in my graphql statements. both return 0. I've also tried flipping the settings in my shopify account for prices to include and exclude taxes. Stil 0 when calling via Storefront API. As soon as you go to the hosted checkout though, the taxes are showing fine. 

 

Anyone else had issues with this? Is this an error in the storefront API?

Highlighted
Shopify Staff
Shopify Staff
1555 81 288

Can you show me some steps I can follow to get a checkout into this state? I feel like I'm missing a bit of information, so replication steps would be greatly appreciated! I just want to make sure I'm understanding your issue completely and getting you the correct answer.

 

Cheers.

0 Likes
Highlighted
New Member
1 0 0

I'm seeing the same issue with the Storefront API. A simple reproduction is to use the react-apollo example in the storefront-epi-examples on github. It requests "totalTax" (but I believe this is deprecated for "totalTaxV2" now). https://github.com/Shopify/storefront-api-examples/blob/master/react-apollo/src/checkout.js

 

Both "totalTax" and "totalTaxV2" always return "0.00" for the API, but when you click the Checkout button in the example, it launches a new window with the tax shown. This seems like a bug, or at the very least, there should be an updated example how to actually get this tax.

0 Likes
Highlighted
New Member
2 0 0

I am also seeing this. A product that is taxable is in a checkout i have created, and totalTax always returns zero. How can we get the actual final total?  (I am using the latest April 2020 API)

0 Likes
Highlighted
New Member
2 0 0

It turns out i didn't have a shipping address added...this is my fault. Once I added the address the tax showed correctly.

0 Likes