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).