Skip to main content

I’ve got a react native project that has an auth system. The user must be logged into to purchase our monthly or yearly premium subscription. He must also be logged in to restore purchases (Not sure if this is allowed by the App Store). I created an account in my Android app, purchased the premium subscription. However, when I logged into the same account in my iOS app and tried restoring purchases, I received an error because the user has no active entitlements which makes sense, but I do see the play store entitlement under all entitlements - not sure what to do with that information exactly. I was under the impression that the user could buy my premium subscription on one platform (Android), and then not have to pay for the same premium subscription on the other platform (iOS). Maybe I am misunderstanding something? I’ve read most of the docs, including the part under Restoring Purchases which says:

Restoring purchases is a mechanism by which your user can restore their in-app purchases, reactivating any content that had previously been purchased from the same store account (Apple, Google, or Amazon)

My confusion lies in how I can make it so that the user doesn’t have to pay on iOS if he already paid on Android. Similarly, if the user paid on my website, how can I give him premium access on Android and iOS? 

@tina @sharif Do you happen to have any advice regarding the above question?


I’ve got a react native project that has an auth system. The user must be logged into to purchase our monthly or yearly premium subscription. He must also be logged in to restore purchases (Not sure if this is allowed by the App Store).

This is fine.

 

I created an account in my Android app, purchased the premium subscription. However, when I logged into the same account in my iOS app and tried restoring purchases,

Restoring here will not work. Restoring purchases checks the Store user that is logged in in the current Store of the device that the app is currently running on for purchases. If you purchased on Android, you can only restore on Android while logged into the same Play Store account that the purchase was made on.

Also, you should not need to restore. When you made the purchase on Android while logged in - logged into the SDK with App User ID timg123 for example - that should attach the active subscription to the App User ID timg123 in RevenueCat. If you were to login to the SDK on iOS to with the same App User ID timg123, the active subscription status and entitlements should be available there as well, and there is no need to restore.

 

My confusion lies in how I can make it so that the user doesn’t have to pay on iOS if he already paid on Android. Similarly, if the user paid on my website, how can I give him premium access on Android and iOS? 

Sharing subscriptions across apps and platforms is also covered in our docs here.

They would just need to be logged into the same custom App User ID on the SDK that was logged in when the purchase was made. Let’s say you have an authentication system that provides user id’s. It looks like this,

  1. User opens your iOS application and logs into your authentication system providing you their user ID from that system:  158f8d28-b64f-4e8e-939a-5a7ffa11d7b7
  2. The SDK is configured with that custom App User ID, or the SDK is logged into with that same custom App User ID.

  3. The user makes a purchase granting them the entitlement, pro

  4. The user opens the app on another device e.g. Android.

  5. They login and get the same user id, 158f8d28-b64f-4e8e-939a-5a7ffa11d7b7

  6. The SDK is configured with that custom App User ID, or the SDK is logged into with that same custom App User ID.

  7. Their customer info shows that they have the entitlement, pro

 


Got it @sharif thanks for your reply. It makes a lot more sense now. Does this mean if user wants to transfer purchases to another user he has to do it from the same SDK (iOS, Android, web) that he purchased the subscription on?


@sharif Just bumping this conversation. 


Reply