Unexpected Behavior After Calling Shipping Rates API Endpoint

Hello,

We use the Shipping Rates endpoint of the Shopify AJAX API at

https://shopify.dev/docs/api/ajax/reference/cart#generate-shipping-rates to show all shipping rates available.

The problem is this call (/services/currency/update?) is unexpectedly modifying the store currency when you launch a request for that Shipping Rates endpoint

That call changes the store currency, probably unintentionally, to the currency of the country chosen to collect the shipping rates.

I think this behavior did not occur before, this is a bug or incorrect behavior and this call should update the currency (referring to the shipping address) only on the checkout page.

Because if it works, as it does now, on every store page, any app that makes a request to the Shipping Rates endpoint for an specific country automatically causes the entire store’s currency to change to this country currency.

Can someone from Shopify confirm that they are aware of the issue and working on a solution?

We have an app with more than 5,700 merchants depending on that feature.

Thanks in advance.

3 Likes

Hi Rosanna,

Thanks for flagging this - we’re looking into this issue and I’ll report back here when I have an update.

1 Like

I am facing similar issue where if the login/register fails, instead of page with error message, I am getting redirected to this URL and then the appropriate page which loses the error message.