# Subscriptions and app availability

**URL:** <https://community.shopify.dev/t/subscriptions-and-app-availability/6364>\
**Category:** Products and Orders APIs\
**Tags:** subscription-api\
**Created:** [January 20, 2025, 2:05pm UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364 "2025-01-20T14:05:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vlad\_Kozulin](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Vlad\_Kozulin](https://community.shopify.dev/u/Vlad_Kozulin)\
**Post date:** [January 20, 2025, 2:05pm UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/1 "2025-01-20T14:05:15Z")

</div>

I have a question regarding subscription handling in my Shopify app. Currently, users are granted access to the app if they have an active subscription with a 30-day renewal period.

The issue: I was relying on `[activeSubscriptions](https://shopify.dev/docs/api/admin-graphql/2024-04/objects/appsubscription)` to grant access. If there was at least one active subscription, access was granted. However, this caused a problem: when a user cancels their subscription, the `activeSubscriptions` array becomes empty, and access is revoked immediately. This is incorrect because the user has already paid for 30 days of access, and their subscription cancellation should not affect access during this period.

I would like to know the best way to handle access logic in this scenario. Specifically, how can I ensure that users retain access for the full 30 days they’ve paid for, even if they cancel their subscription?

Additional context:

- I have three plans.
- If a user upgrades, the new plan is applied instantly.
- If a user downgrades, the changes take effect after the current billing cycle (30 days).

---

<div class="post-metadata">

**Author:** ![Akos\_Paska](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Akos\_Paska](https://community.shopify.dev/u/Akos_Paska)\
**Post date:** [January 20, 2025, 2:25pm UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/2 "2025-01-20T14:25:29Z")

</div>

> [@Vlad\_Kozulin](#):
>
> [AppSubscription - GraphQL Admin](https://shopify.dev/docs/api/admin-graphql/2024-04/objects/appsubscription)

Hello Vlad.

As far as I know it can be found not in the activeSubscriptions, instead of the allSubscriptions.

It is because it’s indeed cancelled, but still active, and that time contains by the currentPeriodEnd property.

---

<div class="post-metadata">

**Author:** ![Vlad\_Kozulin](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Vlad\_Kozulin](https://community.shopify.dev/u/Vlad_Kozulin)\
**Post date:** [January 21, 2025, 10:08am UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/3 "2025-01-21T10:08:59Z")

</div>

Hi, thanks for your response! After some thought, I’ve found a solution.

Initially, I was concerned because I’m using a different replacement behavior: “apply subscription after the billing cycle ends.” This could complicate the logic.

Here’s what I’ve done instead. I dont use all subscriptions endpoint but activeSbuscriptions :

- I rely on the subscription update webhook and the `getActiveSubscription` endpoint.
- If there’s an active subscription, I retrieve its `endDate` and record it.
- If there’s no active subscription, the `endDate` remains unchanged.
- By consistently tracking the `endDate` of the last active subscription, I use it to determine whether the user can access my app.

Thanks for your response

---

<div class="post-metadata">

**Author:** ![sezerium](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/sezerium/32/5907_2.png) [@sezerium](https://community.shopify.dev/u/sezerium)\
**Post date:** [March 3, 2025, 4:48pm UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/4 "2025-03-03T16:48:30Z")

</div>

This is not an ideal solution. I expected to retrieve `currentPeriodEnd` from subscriptions even if the user cancels during the billing period. However, we now face the same issue when a customer uninstalls the app or downgrades their plan—the `currentPeriodEnd` field returns null in the subscription GraphQL response.

Would you consider this a bug?

---

<div class="post-metadata">

**Author:** ![Vlad\_Kozulin](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Vlad\_Kozulin](https://community.shopify.dev/u/Vlad_Kozulin)\
**Post date:** [May 15, 2025, 1:19am UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/5 "2025-05-15T01:19:37Z")

</div>

It returns null because there is no subscription, so i dont think it is a bug

---

<div class="post-metadata">

**Author:** ![aciulpan](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/aciulpan/32/6733_2.png) [@aciulpan](https://community.shopify.dev/u/aciulpan)\
**Post date:** [May 19, 2025, 8:49am UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/6 "2025-05-19T08:49:47Z")

</div>

But shouldn’t it return the actual end date? Shopify says that changing from a paid subscription to a free subscription the change would be effective at the next billing cycle. How does a developer actually check whether the cancelled subscription is still active by only using Shopify’s API? Isn’t this the point of managed pricing to make life easier for developers?

---

<div class="post-metadata">

**Author:** ![Zwei\_Black](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/zwei_black/32/13842_2.png) [@Zwei\_Black](https://community.shopify.dev/u/Zwei_Black)\
**Post date:** [July 15, 2025, 10:16am UTC](https://community.shopify.dev/t/subscriptions-and-app-availability/6364/7 "2025-07-15T10:16:46Z")

</div>

We’ve come to a similar conclusion. I’ve integrated with the Stripe API before, and compared to Shopify’s subscription API, Shopify’s only cares about the subscription itself, not what the user’s current plan is. Stripe’s `subscription schedule` allows for future modifications to subscriptions, but with Shopify, any subscription changes, whether it’s cancellation, upgrade, or downgrade, take effect immediately.

For Shopify, a user not having a subscription doesn’t necessarily mean they aren’t a VIP member. Conversely, a user being a VIP member doesn’t necessarily mean they have an active subscription.

Therefore, we might have to manage member status ourselves. Shopify only provides subscription management.
