Question

A re-subscription(without an introductory trial) does not work after a introductory subscription was initially done then canceled

  • 2 May 2023
  • 3 replies
  • 76 views

Badge +4

We've noticed that when a user subscribes with a free trial and cancels it (after the trial period), then subscribes again, our code doesn't log the successful purchase, even though RevenueCat does. This seems to only occur for subscriptions without a trial period, as our code only looks for an entitlement set up as a subscription with a trial period.

We believe the issue lies with our code not accounting for subscriptions without a trial period:

 

const purchaseMade = await Purchases.purchasePackage(the_package);

if (typeof purchaseMade.productIdentifier !== "undefined") ...

 

For some reason, this returns true when they subscribe with the free trial and false when they subscribe without it.


Additionally, we're facing another issue with testing subscriptions after a trial ends effectively. We don't know how to do this without waiting for 3 days(introduction trial period). Do you know of a quicker way to test this?


3 replies

Badge +4

Small update, this issue only occurs in production but seems to be working fine in testing mode(Sandbox + debugging mode)***

Userlevel 6
Badge +8

Hey @tony.reyes!

It’s hard to tell what might be happening, especially if it’s not reproducible when testing (where logs are more easily accessible). Are you able to get logs from the production build? A product with or without a trial applied shouldn’t have any impact on the resulting product ID from the purchase result, but logs might help to pin something down.

Does checking the resulting CustomerInfo work as expected to see if the user has entitlements?

Edit: As for testing, trial durations are sped up so a 3 day trial should only be a few minutes - you can read more in our testing guide here: https://www.revenuecat.com/blog/engineering/the-ultimate-guide-to-subscription-testing-on-ios/#h-subscription-durations-in-the-developer-sandbox

Badge +4

Hey @cody 

 

After testing the app using the build configuration release, we confirmed that everything was working fine. However, despite not making any changes to the revenue-cat code since the last version, our app on the app store is encountering the error. We have another app that uses the same code with react-native-purchases version 4.5.2, and it's functioning without issues. The problematic app is using react-native-purchases version 4.6.2. At this point we’re considering either updating to the latest version and rewriting the code. Or downgrading the version to 4.5.2. We'd appreciate your thoughts on this.

 

Reply