How to get renewed subscription orders from Order api

New Member
3 0 0

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?

Reply 1 (1)
Shopify Staff
Shopify Staff
13 4 4

Hello mohsinmalik568,

Thank you for you question!

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

You can find out more about the SubscriptionContract API page here: