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 71

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 71

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.