Side effects of shipping rate retrieval before Checkout

Hi everyone! We’re using the Ajax Cart API endpoint to generate shipping rates for a customer’s cart: https://shopify.dev/docs/api/ajax/reference/cart#generate-shipping-rates

We’re calling prepare_shipping_rates, then async_shipping_rates

There are two issues that we’re noticing:

  1. As soon as I call “prepare_shipping_rates.json”, the Country, Province, City, and Postal code are all pre-populated in Checkout. This may seem like a helpful feature however many shops have the same rates for an entire country (like the US), and use this endpoint to show the same rates to everyone. That has worked great until recently. Now on Checkout all their customers see the same location that was used in the API call to prepare_shipping_rates.json. Is there a flag that can be used to tell Shopify that they shouldn’t use this API call’s inputs on Checkout?

  2. Even stranger, on shops which have some rates defined in Shopify, and some rates defined in 3rd party carrier apps, we’re noticing as of June 12, 2023 that after requesting the rates, the Checkout page now magically defaults to the most expensive option when the Checkout page is displayed. This appears to be device-depended. Easiest to reproduce on an iPhone. It’s important to note that the most expensive option is the only Shopify-generated rate, while the cheaper options are the 3rd-party app-generated ones. This may have something to do with why the most expensive rate is pre-selected?

Looking forward to any feedback from Shopify, and thank you in advance!

Did you find a solution to 1? Got the same issue where the shop has a shipping price per country so they don’t need province and zip. We’ve got it using default values on the countries that Shopify require them, but then those values are pre-populated on the Checkout page, which isn’t ideal.

Hi @ShopDoctors did you find a solution to 1?

Have been trying to override the prepare_shipping_rates with empty values before going to checkout, but after setting this, it does not accept empty values.