How to Retrieve Subscription Details for Orders Using Shopify API?

Hi there,

We have a Shopify live app and I’m working on importing orders for few Shopify store clients that sells products including subscription-based products. I need to retrieve the subscription details (e.g., subscription status, plan duration like 3 months or 6 months, next billing date) associated with these orders using the Shopify REST API.

Could someone guide me on the best approach to access subscription information for orders through the REST API? Are there specific endpoints or fields I should be looking for to fetch these details?

Additionally, we requested the read_own_subscription_contracts and read_customer_payment_methods scopes to access Shopify’s Subscriptions API. However, our request was rejected by Shopify with the explanation:

The core function of these scopes is to permit apps to access their own generated subscription data. These granting scopes are typically allocated to apps that directly handle or create subscription services and are configured to only access data pertinent to the subscriptions that originate from within the same app. Since your app doesn’t manage subscriptions directly, these scopes will not facilitate access to subscription data from other installations or apps which seems necessary for the functionality you described.

Since we cannot use these scopes, what alternative approaches are available to retrieve subscription information for orders?

Would leveraging order webhook, metadata, tags be a viable solution?

Thanks in advance for your help!

Unfortunately, even if you had access to read_own_subscription_contracts you still wouldnt have access to the subscription data. That _own part of the scope refers to the fact that you have access to your app’s own subscriptions but not subscriptions that were created by other apps’ selling plans.

The only current way to do what you want is to integrate natively with the subscription apps themselves via their APIs (for those that have APIs).

1 Like

@Brian_Singer

Appreciate your prompt response.

I have a few follow-up questions:

  1. Is the subscription lifecycle (e.g., renewals, billing dates, cancellations) completely managed by the third-party app?

  2. Are there webhooks provided by Shopify or these third-party apps that notify us of subscription-related events, such as renewals, cancellations, or modifications?

  3. For renewals or recurring billing, does a new order or order line item get created in Shopify when the next billing period is reached, or is this entirely processed by the third-party app without appearing in Shopify’s order history?

  4. When the subscription order is cancelled will it create a order cancelled webhook?

Any insights or pointers would be greatly appreciated. Thank you!

answer to all of these is it’s 100% controlled by the shopify third party app and you’ll get no access, webhooks or notifications from Shopify for anything other than orders that are generated. Orders do have some info like app name and maybe selling plan id or contract id but nothing that will be useful without more context from the app itself

1 Like