New Shopify Certification now available: Liquid Storefronts for Theme Developers

Lack of priceV2 object from Checkout API when shipping address is not set

Solved
PiotrW
Visitor
2 1 0

Hi,

we are using GrapQL API to integrate with Shopify from our mobile app. And we have a strange issue, that until the user will not provide his shipping address then from the Checkout API in the lineItems we are not receiving priceV2 value (we only compareAtPriceV2 value) for specific products (so we don't know what is the discounted price for a specific product), but at the same time totalPrice returned in the response is based on the discounted prices.

And the situation is changing when the user will provide his address, then checkout API is returning both priceV2 and compareAtPriceV2 values.

Why it behaves like this? how we can get discounted prices for products before the user will provide his address?

Thanks in advance

Accepted Solution (1)
PiotrW
Visitor
2 1 0

This is an accepted solution.

Can be marked as resolved. Dev had a bug in the mutation.

View solution in original post

Reply 1 (1)
PiotrW
Visitor
2 1 0

This is an accepted solution.

Can be marked as resolved. Dev had a bug in the mutation.