Questions, troubleshooting, and feedback on Subscription APIs
Hello Subscriptions team,
So subscriptions apps are responsible for initiating billing attempts on the the subscriptions' next billing date.
However, there's no clear way to query SubscriptionContracts by nextBillingDate. So if the app is supposed is create billing attempts today Feb. the 22nd, what's the best way to fetch all contracts that are supposed to trigger on that day?
Thank you for your time,
Phil
The expectation for apps is that they maintain an up-to-date `nextBillingDate` to subscription contract mapping their own database. This can be done through the listening to subscription contract webhooks.
This could be a feature we consider introducing in the future. As a warning, at large scale, querying Shopify for contracts in this manner would consume Graphql API points and limit how quickly orders could be placed.
Thanks for your quick answer @ewalker!
I just find it strange that we're expected to build a database that is a replica of existing data in your databases.
Thanks,
Phil
I still find it baffling @ewalker that the subscription contracts aren't queryable, the customers and the orders are but not the contracts? : https://shopify.dev/api/admin/graphql/reference/common-objects/queryroot?api%5Bversion%5D=unstable
This is actually very strange to me too. Why shopify creates the entities if they doesn't support querying/filtering.
@Phillip_Malboeu Did you find any solution for this?
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022