Skip to main content
Question

Detect cancelled (but still active) subscription

  • 22 November 2024
  • 1 reply
  • 18 views

Forum|alt.badge.img+2

Hello,

I’m setting up a subscription with 7 days free trial & 1 year period on Android & iOS, using Flutter SDK. I want to show on the UI wether the subscription is:

  • not subscribed
  • in trial (& active)
  • active
  • cancelled (& active)
  • expired

All states work except cancelled (when the subscription is still active but won’t renew). Upon my app startup, I call this code:

    Purchases.invalidateCustomerInfoCache();
    _customerInfo = await Purchases.getCustomerInfo();

 

Even though RC’s debug logs print “😻 CustomerInfo updated from network.”, I still get cached entitlements whose “willRenew” field is always true.

I added an overflow menu action to execute this code whenever I want to see if calling it multiple times works (as I read here & there on the forum), it doesn’t.

The only way to get an up to date information is to call Purchases.restorePurchases(), but this shall only be called upon user request.

Is there a way to get up to date CustomerInfo upon app startup?

This post has been closed for comments

1 reply

Forum|alt.badge.img+2
  • Author
  • New Member
  • 2 replies
  • November 22, 2024

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings