Question

willRenew Not Updating

  • 23 August 2021
  • 1 reply
  • 22 views

Badge

I’m working on an app with an auto-renewing subscription. 

When using Sandbox testing, I can subscribe, and it updates just fine. However, if I cancel the subscription, when I go to get the updated `purchaserInfo`, the `willRenew` property is `true`. Even if I reset the cache, it still won’t be updated.

How can I have it properly update?


1 reply

Userlevel 2
Badge +6

Hey @Michael Berk ,

Are you testing for IOS or Android?

If you are using IOS are you using StoreKit?

There is a  limitation of StoreKit testing receipts- Apple doesn't actually include the same renewal data that we need in these Xcode receipts that they do for normal sandbox/production purchases, so it's not possible for us to calculate the 'willRenew' field correctly with these types of receipts. Sorry about that!

You should be able to use `isActive` field, it may take a few minutes for our cache to refresh in the app. The `isActive` field is calculated when the PurchaserInfo object is created, so it will take a cache refresh (~5 minutes) to get this value updated. This is more noticeable in sandbox when testing shorter durations, etc, but you are safe to call the `purchaserInfo` method as often as you need.

 

Reply