Hello,
I am developing a custom app for my Shopify store and need help with applying a free shipping voucher or setting the shipping costs to 0.
I have tried multiple approaches, including:
- Using the checkoutDiscountCodeApplyV2 mutation.
- Attempting to manipulate the shipping rate directly through the Storefront API.
- Trying to use Shopify Functions to modify shipping rates.
However, I have encountered various issues:
-
An error indicating that I need the write_checkouts scope, which I cannot find anywhere.
-
Other errors such as invalid global IDs or issues with applying discount codes.
Here are some specific error messages I received: -
“Invalid global id ‘s???x1Di?{??x1Fsmxw??6ն?’”
-
“Field ‘code’ doesn’t exist on type ‘DiscountApplication’”
What approach should I take to achieve free shipping through a discount code or by setting the shipping cost to 0? Does anyone have code snippets or examples they can share?
Thanks a lot!