How can our app set the duty and tax on the checkout page in real time

Is there a way to set the amount of duty and tax in the order summary on the checkout page in real time? Having it be by using ui extensions, functions, storefront api, carrierservice, theme customizations (not including editing checkout.liquid which I understand is being deprecated), any way at all…

I’ve been spending days trying to find how to do it but got nowhere, the goal is for our app to calculate the taxes when the customer selects the shipping destination.

Hi Oz,

From exploring this previously in this forum post, there does seem to be limitations around overriding the native method for calculating and applying duties and taxes on checkout. This is primarily due to the checkout being a protected resource which makes real-time changes to data difficult to achieve.

However, I can create a feature request for making specifically the duties and taxes easier to access - how is the native method for calculating and collecting duties and taxes not meeting your use case, and how would you aim for your app to enhance/ expand this?

Hope this helps,

Hi Liam, thank you for replying.

To be specific, I would like to calculate the import taxes in real time and use a different service to do it, not the Shopify one (calculating import taxes is a whole big subject and Shopify not necessarily offer the best solution).

It doesn’t even need to add it to the duties and taxes row in the summary, it can be a different row with a different name or to even without any row and just add it to the total (so btw - is there a way to change the total?).

The only way I could think of is to add a CarrierService which when selected will add it as a shipping cost, but then I can’t use the default regular carrier services, get the default shipping rates etc.

As mentioned in the post in your link, I could also see apps in the app store that indeed do that - for example “Zonos Duty and Tax”.

Although it seems they chosen the CarrierService route at the same time they offer an option for Shopify Plus stores to see the taxes as part of the order summary (see 0:38 on their app store video), I wonder how did they achieve that?

Thanks