I’m building a Shopify app with managed pricing (trial + recurring subscription) and I want users to be able to uninstall and reinstall the app without losing access if they’re still within their billing period.
The flow I’m working with:
-
Merchant is on a trial or paid subscription (mid billing cycle)
-
They uninstall the app
-
Before
currentPeriodEnd, they reinstall it again -
OAuth runs again and I can query
activeSubscriptions
Right now I’m storing subscription state in my DB (status + currentPeriodEnd) to handle this.
What I want is:
If they reinstall within the same billing period, they should regain access immediately without being charged again or creating a new subscription.
Where I’m unsure:
-
Should
activeSubscriptionsalways be checked first on reinstall before creating anything new? -
Is it expected that a subscription remains valid across uninstall/reinstall until
currentPeriodEnd? -
In practice, is the DB just a cache/safety layer, while Shopify is still the source of truth for billing?
-
What’s the standard way to avoid accidentally creating duplicate subscriptions when a merchant reinstalls?
Just trying to make sure I’m handling reinstall flows correctly without breaking access or billing.