Our app needs a list of the current tax rates (both their name and %) enabled in a Shopify store, so we can allow a user to “map” those within our app as we do a few things with their order data after an order is placed in Shopify.
This used to work perfectly with the Shopify “Country” REST API - but since we’ve had to remove calls to this as it’s now deprecated, it’s been causing quite a few issues with accuracy/reliability in our app.
It’s been a bit frustrating that a list as simple as this - the current tax rates enabled in a Shopify store - seems to be impossible to query via Shopify API, and we’re currently relying on messy workarounds, like querying a list of countries that the store ships to, instead.
@Liam-Shopify, you helped with a bit of a response in a separate thread here, but Metafields wouldn’t seem to work in the above scenario. Would you mind sharing if there’s any plans to support this rather simple scenario?
We’ve done a ton of exploring in the Shopify APIs, like seeing if we can get this list within the “shop” properties, or even in “markets” - which would make sense for this to be present in - but it’s simply completely missing.
1 Like
Hey @myworks
Kyle here from the Developer Support team. Thanks for flagging this.
I’m curious about your specific use case for mapping tax fields to orders. Since tax rates can change frequently, using data from recent orders or calculations might actually be more reliable than a static list. Would you mind sharing more details about your implementation? This would help me effectively communicate a feature request to our teams for consideration in future additions.
In the meantime, you could use the draftOrderCalculate mutation as a workaround: draftOrderCalculate - GraphQL Admin. This endpoint lets you determine information like total taxes without actually creating a draft order. By creating test scenarios with different shipping addresses, you could extract the current tax rates being applied in different contexts.
Thanks for the quick reply, @KyleG-Shopify !
Totally agreed on tax rates changing frequently…in the USA. I should have noted more specifically, but my question is actually specifically related to all regions except-for/outside the USA.
We have many users in Canada, UK, Europe, Australia and New Zealand; where they have set/specific tax rates like GST or VAT, that don’t change…but we need to be able to tell what regions they have tax enabled for. The purpose of this is to show their currently-active tax rates inside of our app - which they can then map to different data points inside our app as we sync their orders once they’re placed in Shopify.
Hopefully this helps clarify a more specific use case? The above tax rate values don’t often change; and the difficulty here is that we can’t find a way to tell what tax rates they have active/enabled in Shopify, so we have trouble presenting them with a UI that lets them tell us how to manage each tax rate we may come across in an order before we sync the order.
Thanks @myworks , I’m investigating to see if this is something on the radar for adding to graphql. I’ll let you know once I’ve found out more.
Hey @myworks
I checked with our internal tax teams and they mentioned that this isn’t currently on the roadmap for implementation in GraphQL. I have still submitted the feature request with your context though so we do have that on record.
Some additional thoughts: Looking at the deprecated REST endpoint, there are many factors that affect taxation (customer exemptions, company exemptions, market exemptions, product exemptions, etc.) that weren’t fully captured in that endpoint. Using order data would be the most reliable way to ensure any workflows in your app reflect the store settings and the buyer context.
As Liam mentioned, using metafields to store this tax data for your app may be the best way. Some ways to implement this could be using webhooks to monitor order creation events and programmatically update these metafields based on live order data.
For regions with stable tax rates, you might also consider integrating with public tax databases that provide current country and region rates. This would give you the baseline mapping capability you need.