Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: Storefront API - Shipping rate can't be blank

Solved

Storefront API - Shipping rate can't be blank

Jimmy430
Tourist
12 0 1

Hi there,
I'm building a mobile APP with react-native using Shopify Storefront API, when I going to implement checkout function I face some problem.
In our business model, if customers with specific tag then they don't need to pay money for buying specific collection, so how I implement this is 
1. create checkout (checkoutCreate mutation)

2. append 100% off discount code to this checkout (checkoutDiscountCodeApplyV2 mutation)

3. complete checkout (checkoutCompleteFree mutation)
but when checkoutCompleteFree mutation be called, it return error with message "Shipping rate can't be blank", but I didn't see any requirement of shipping rate in document of these mutation, is there anything I doing wrong? 
Please help me to solve it, would be appreciated with any suggestion
Accepted Solution (1)

tolgapaksoy
Shopify Partner
112 7 76

This is an accepted solution.

Well you have products in your checkout that require shipping. So you either have to set a free shipping line, or mark these products/variants to not require shipping.

View solution in original post

Reply 1 (1)

tolgapaksoy
Shopify Partner
112 7 76

This is an accepted solution.

Well you have products in your checkout that require shipping. So you either have to set a free shipping line, or mark these products/variants to not require shipping.