For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
I am working with shopify rails i want to calculate the renewal rate of the subscription contracts but i am unable to find any source where i can know that the order is renewed and belong to specific subscription contract using Order Api can anyone help?
Hello mohsinmalik568,
Thank you for you question!
The SubscriptionContract GraphQL type might be able to help you.
Through the SubscriptionContract type you can access:
You can find out more about the SubscriptionContract API page here: https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract
To learn more visit the Shopify Help Center or the Community Blog.
To add to this, you can also find the subscriptionContract via the orderID in GraphQL:
{
order(id: "gid://shopify/Order/XXXX") {
lineItems(first:10) {
edges {
node {
contract { id }
}
}
}
}
}