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?
The SubscriptionContract GraphQL type might be able to help you.
Through the SubscriptionContract type you can access:
originOrder: The order from which this contract originated.
orders: A list of orders that are associated with the SubscriptionContract. An order is created each time a SubscriptionContract is successfully billed using the subscriptionBillingAttemptCreate mutation
billingAttempts: A list of billing attempts that are associated with the SubscriptionContract