Skip to main content

I want to have a system like netflix where I ask users to log in with email and using my custom auth backend, store the user info. 

So user logs in on iOS device and purchases the subscriptions, and now can login to android device and get access to pro features (or vice versa). Achieving this so far is not the problem. The problem comes with the discrepancy where the source of truth of purchases is linked to the android or iOS account and not my app’s login.

So imagine, customer A logins in android device with email - abc@email.com, and is also logged in his android id with the same email id, which is fine. But now if he logs out of my app and then log back in with another email id, say xyz@email.com, technically he should not have pro subscription. and since RC also stores both these users as separate account, the data I get from RC treats the user with xyz@email.com as a non-pro user.

But now if the xyz@email.com tries to purchase the subscription, he will get an error saying - You’re already subscribed to Pro, since his android account is still abc@email.com

I can try to get the system logged in user account and use that to tie in the same user in another platform, but iOS does not provide that info in the app (AFAIK, correct me if I am wrong).

What can I use to identify users using the same email id across platforms so that they can share the same subscriptions?

Or How do I restore purchase of a user on a platform who has purchased subscriptions from another platform?

What is the correct solution to this issue? Any help on this is appreciated.

Hello!

But now if the xyz@email.com tries to purchase the subscription, he will get an error saying - You’re already subscribed to Pro, since his android account is still abc@email.com

I can try to get the system logged in user account and use that to tie in the same user in another platform, but iOS does not provide that info in the app (AFAIK, correct me if I am wrong).

What can I use to identify users using the same email id across platforms so that they can share the same subscriptions?

This is expected behavior and there’s no one way to solve this for your customers because it’s a limitation of the OS itself. Purchases are handled by the App Store/Play Store and are attached to the App Store/Play Store account, so there are going to be cases where there’s a mismatch between the user logged into your app and the user logged into the device’s App Store/Play Store. Here are some workarounds:

  1. You can restore purchases when the user attempts to make a purchase. That will cause RevenueCat to transfer the purchase from abc@email.com to xyz@email.com. This isn’t appropriate if you require abc@email.com to retain their purchase at all times. But at least xyz@email.com and abc@email.com can’t access the purchases simultaneously.
  2. Set your restore behavior to block restores. That way you can try to restore purchases as a method of testing if another user has that purchase already. If the restore fails with an error, you can let the user know that another user already has this purchase already.
  3. If you notice that the device already has a purchase, you can point the user to the subscription management functionality on their device using RevenueCat’s managementURL property. They will be able to see there what purchases the device has.

Or How do I restore purchase of a user on a platform who has purchased subscriptions from another platform?

As long as the purchases are in RevenueCat and you query RevenueCat’s API with the same user identifier as before, RevenueCat will return all subscription data.

 


Reply