Question

Flutter - isActive is false after auto renewal of subscriptions (Sandbox)

  • 19 January 2022
  • 1 reply
  • 149 views

Badge +4

Testing my monthly (silver) subscription in a sandbox environment using Flutter. When I try to subscribe (using a test card) on the Google Play store, I get the selected entitlement and the status of isActive as true. Everything works as expected.

However, when the subscription auto-renews, post that I see the entitlement info but the isActive flag becomes false. When I try to purchase the subscription again from the store, I get a message that the subscription is already active.

Here is the dump of the purchaseInfo object:

{entitlements: EntitlementInfos{all: 
{
silver: EntitlementInfo
{identifier: silver, isActive: false, willRenew: true, periodType: PeriodType.normal, latestPurchaseDate: 2022-01-18T22:46:29.000Z, originalPurchaseDate: 2022-01-18T22:46:29.000Z, expirationDate: 2022-01-18T22:53:25.000Z, store: Store.playStore, productIdentifier: silver_monthly, isSandbox: true, unsubscribeDetectedAt: null, billingIssueDetectedAt: null}}, active: {}
}, latestExpirationDate: 2022-01-18T22:53:25.000Z, allExpirationDates: {silver_monthly: 2022-01-18T22:53:25.000Z}, allPurchaseDates: {silver_monthly: 2022-01-18T22:46:29.000Z}, activeSubscriptions: [], allPurchasedProductIdentifiers: [silver_monthly], firstSeen: 2022-01-18T22:38:25.000Z, originalAppUserId: $RCAnonymousID:XXXX, requestDate: 2022-01-18T22:55:44.000Z, originalApplicationVersion: null, originalPurchaseDate: null, managementURL: null, nonSubscriptionTransactions: []}
 

I am using a real device to test.

 

Can you please let me know how to resolve this?


1 reply

Userlevel 6
Badge +8

Hey @Varun!

Sorry for the delay here. Did you end up figuring this out?

Based on the PurchaserInfo object, isActive is false because the expiration date is older than the request date. I’d make sure you are calling getOfferings as often as possible, so we can fetch the latest entitlement data.

Reply