Solved

Upgrading paid users with a years' free subscription

  • 15 December 2021
  • 3 replies
  • 132 views

Badge +5

I’m upgrading an existing paid app to a yearly subscription model, and have followed this guide: https://www.revenuecat.com/blog/converting-a-paid-ios-app-to-subscriptions

and got everything set up within my app, tested it using a sandbox, and made sure that the entitlements are working ok when I subscribe.

One thing I’m unsure about is that I want existing users (those with v1 of the app) to get a year’s free subscription, and then after that, have them go onto a reoccuring subscription.

In RevenueCat, I’ve set up a package that has full access with a 14 day free trial (called “full”). I’m calling this code:

func syncReceipts (completion: ((Purchases.PurchaserInfo?) -> Void)? = nil) {
CompatibilityAccessManager.shared.syncReceiptIfNeededAndRegister(
entitlements: [.init(entitlement: RevenueCat.Entitlements.full.rawValue, compatibleVersions:["1.0","1.0.1","1.0.2","1.1"])],
completion: completion
)
}

func checkAccess(result: @escaping ((_ isActive: Bool, _ purchaserInfo: Purchases.PurchaserInfo?) -> Void)) {
CompatibilityAccessManager.shared.entitlementIsActiveWithCompatibility(entitlement: RevenueCat.Entitlements.full.rawValue, result: result)
}

to make sure the user has access to the entitlement, but will this grant them permanent access, or is the equivalent of signing up to the subscription (i.e. it will last a year then renew)?

Many thanks,

Owen

icon

Best answer by cody 17 December 2021, 21:43

View original

3 replies

Userlevel 6
Badge +8

Hey @Owen Bennett!

The helper package you’re using is good for granting previously paid users access to entitlements client-side for an indeterminate amount of time, but maybe not so much for only granting it for a limited amount of time. If you only want to grant access for a certain period of time, I’d recommend instead to:

  1. Sync the users receipt with Purchases.shared.syncPurchases if needed (by fetching PurchaserInfo and checking if originalApplicationVersion is nil)
  2. Check their PurchaserInfo for their originalApplicationVersion (to be sure that it’s a version that was previously paid)
  3. Grant access to the premium features if today’s date is less than 1 year from the originalPurchaseDate property in PurchaserInfo (this is the date the customer first downloaded your app)
  4. If it’s past that 1 year for a user that had a paid version, show them a paywall to purchase a subscription

Does that make sense?

Badge +5

Hi Cody,

 

Thanks for your reply, I think that makes sense.

I was wondering if another option would be to create another package that had a year free introductory period, and then offer that only to upgraders? 

 

Owen

Badge +3

Hi @cody

 

Question on the use of originalApplicationVersion to determine if I should grandfather certain users into a free subscription.

The docs say:

 

The first date this entitlement was purchased. May be the same as the latest purchase date.

 

Now, what if the app was purchased on the Apple App Store (iOS), not using RevenueCat and entitlements? I’ve only added RevenueCat in the most recent version, which has not yet gone live on the App Store. Will the variable originalApplicationVersion, still be populated with the correct build number when the user first purchased the app even if it was originally purchased without RevenueCat?

 

Reply