For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
Hi everyone,
We've run into a bit of a puzzle with the Subscriptions API. From what I can see, subscription contracts only have a currencyCode, but there's no obvious reference to the market or country from the checkout.
Now, when I'm trying to pull product prices using the Admin API GraphQL, it appears that I need the country for the contextualPricing property to get the pricing accurate.
So, here's my question: How can I determine the market or country where a subscription contract originated? I need this info to ensure I'm getting the pricing right when adding products to a subscription in a Shopify that's using Shopify Markets.
Would appreciate any advice or insights on this. Thanks!
Hi @Brian_S
Not something I've really worked with before, but in basic terms, I'd think you'd be able to get that from either the customer or originOrder field within a subscriptionContracts query in GraphQL (looking at 2023-04)?
I am probably missing something here, and it's actually a much more complex issue, but just in case!
Thanks
Thanks @SB_90 - we did look into those.
The customer object actually does have a market field but its based on the default address for the customer and as a result isn't necessarily helpful on a per subscription basis. Also - a customer could have subscriptions in more than one market.
We didn't find anything on originOrder except for delivery address but that's not reliable bc non-physical products won't have one.
Hi @Brian_S
Are there instances where neither address is provided?
The only other thing I could think to use would be the displayAddress field on the Order object - which according to the documentation will give you:
"The primary address of the customer. Returns null if neither the shipping address nor the billing address was provided."
But it does feel as if you've found a gap there in terms of the association between the pricing, subscription and order.
Yea - i think there are similar problems with displayAddress
Hi, Brian. Thanks very much for bringing this to our attention. It does seem to me to be a tricky question. I'm going to have to talk to some people about this, so I appreciate your patience in the meantime. Feel free to ping again in a week or so if we don't get back to this thread.
To learn more visit the Shopify Help Center or the Community Blog.
Thanks @LarryReid - I just wanted to bring this post up as well as it's fairly related and might be helpful in discussions: https://community.shopify.com/c/international-commerce/shopify-markets-checkout-allows-currency-othe...