We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to track currentPeriodEnd on renewals or uninstall?

How to track currentPeriodEnd on renewals or uninstall?

movolabs
Shopify Partner
2 0 0

Hi Shopify team,

 

We’d appreciate clarification around how to correctly track `currentPeriodEnd` for active subscriptions over time.

 

We currently:

* Store the `currentPeriodEnd` returned after a subscription is approved (via `appSubscriptionCreate`)
* Save that value to our DB to manage access after uninstall or downgrade

The issue is that subscriptions can renew monthly or yearly, but we're not sure if (in test or real charges):

* Shopify does send a webhook (`app_subscriptions/update`) after each renewal ?
* The `currentPeriodEnd` field **moves forward** silently?
* If the merchant uninstalls the app months later and we didn’t fetch it again, we have no way of knowing how long they were charged for

Our goal is to **let merchants keep access until their paid period ends**, even if they uninstall or downgrade mid-cycle.

So:

**➤ What’s the recommended way to keep `currentPeriodEnd` up to date over time?**

* Is polling `appInstallation → activeSubscriptions → currentPeriodEnd` the only option, every day?
* Does Shopify plan to send a webhook on automatic renewals?
* Is there a best practice to handle this (e.g. via GraphQL or scheduled jobs)?

Like we know that currentPeriodEnd will be null if subscription is canceled... so it's not possible to query with GraphQL inside the canceled webhook "app_subscriptions_update", it will already be null...

Thanks in advance for any guidance!

Chris
Movo Labs

Replies 0 (0)