Hello! I’m sorry if it’s not the correct category, i couldn’t find any related to the Subscription API.
I have a custom app i created through the partner center and i would like to manage subscriptions that i have using the Subscription App from shopify, i don’t use any external app for this.
This app is just a administration panel for the seller, the user does not have access to it and they should keep using shopify management page to manage his subscription.
First thing i wanted to achieve is creating a dashboard with all the subscriptions i have in the shop (kind of the one of the Subscription app) and after that adding different options to manage them.
My problem is that, after installing the app in the store, getting access to the Subscription API and granting the scopes read_own_subscription_contracts
and write_own_subscription_contract
, when i do this simple query:
{
subscriptionContracts(first: 10) {
edges {
node {
id
}
}
}
}
or
{
subscriptionContracts(first: 10) {
node {
id
}
}
}
the returned array is empty but i have already active subscriptions in the store, i also tried with a real one instead of a development one, and the result is the same.
Reading on different threads i found information about it but I’m not really sure how to achieve this, also i’ve got some doubts about the scopes, what does it mean “own”? What kind of subscription can i access thought that query?
Is there a way to query all the active subscriptions of the store?
Thank you!
Hey @Pink_Stardust,
Great question. Posting here is ok, the graphql troubleshooting board would also work as well for more general queries.
For your question, are the subscription contracts you are querying created by your app or another app? The reason I ask is the scopes are specific to only your app, so the “own” part means that you can only see and manage subscriptions created by your app.
Hello @KyleG-Shopify,
Thanks for the clarification! Currently, my customers are subscribing through the official Shopify Subscriptions app integrated into my store. I’m in the process of building a custom app to help manage these subscriptions more effectively.
However, I’ve encountered an issue: I can’t access or view any of the subscriptions created through the Shopify app. Based on your answer, it seems that subscriptions created via the official app aren’t exposed to custom apps through the Subscriptions API, as far I can see in the queries.
Given that, do I need to replicate the functionality of the official app using the Subscriptions API myself? That way, can I have full control and visibility over the subscriptions from the start? Or there is something that helps me to achieve what I want to do without replicating everything?
Thanks again for the help, just want to be sure I’m understanding the limitations correctly before going further.
You have that right. Since the subscription was created by the Shopify Subscriptions app, then only that app will have API access. We don’t currently have API’s available for the subscriptions app.
Building a subscription app and migrating the contracts to it, for the purpose of managing a few administration tasks seems like it may be a bit inefficient. Can you share what kind of tasks you’re needing to do that aren’t available in the app? We can explore other ways to do this.
I’ve set up a monthly subscription where customers can subscribe between the 1st and the 25th of the month. When they subscribe, the first order is fulfilled and shipped right away.
However, for the following months, I want the subscription to generate and charge the order at the beginning of each month (ideally in the first few days), and then have the order fulfilled and shipped during the first week of that month.
The issue is, I haven’t found a way to configure the next billing/charge date to match this setup. It seems like the subscription just follows the initial purchase date, rather than allowing me to align all future charges and fulfillments to the start of each month.
Is there a way to achieve this with Shopify’s subscription tools or APIs, or is this currently a limitation?
Thanks for that context. The Shopify Subscriptions app doesn’t currently have the ability to adjust the cycles like you’ve shared. There are other subscription apps in the app store that do offer this functionality, and many of them have API’s available as well.
If you do choose to build this yourself, we have a reference app you can use to help get started GitHub - Shopify/subscriptions-reference-app: Shopify Subscriptions Reference app
Hope that helps
Thank you so much! I’ll play around with that!
Have a great day! 
1 Like