Skip to main content

There is a way to know if the subscription has expired without doing an operation like Purchases.getPurchaserInfo ()
I understand that Purchases.addPurchaserInfoUpdateListener detects when a purchase is made, or whatever but not when a subscription expires.
I use Flutter.
If you have any advice on how to do it I would be grateful.

Thanks

Sorry I forgot to mention that I am talking about an auto-renewing subscription


From reading https://docs.revenuecat.com/docs/purchaserinfo#listening-for-purchaser-info-updates, my understanding is that the listener would indeed trigger when a subscription is expired - at least if the PurchaserInfo object is changed as a result of that.


Hey @Carlo Sacchetti 👋

We’ll never push data to a client, so we’ll only call that listener when PurchaserInfo has been updated from a client operation (a purchase, restore, `getPurchaserInfo`, etc.). We recommend calling getPurchaserInfo as often as you need as we will handling caching this as needed in our SDK. As @Johan mentioned, this would cause the listener to be called after an expiration once PurchaserInfo is refreshed, but it won’t be called automatically at the time of expiration.

You can manually check the expiration date of a subscription via an entitlement in PurchaserInfo if you are unable to refresh PurchaserInfo.


Reply