Skip to main content

 

It goes something like this:

1 - Sign into RC with appID1
2 - Purchase subscription.
3 - Sign out and back in again using appID2
4 - RC says no subscription active for appID2 and so we present offerings.
5 - Purchase fails because (presumably) Play Store thinks we already have an active sub because appID1 bought one using the common PlayStore sign in.

I’d like to prohibit sub sharing across different accounts.
In order for appID2 to be able to purchase a subscription, another Play Store account needs to be used.

What’s the general best practice for dealing with this scenario?

Many thanks.

To add some complexity, I have 2 products:

1 - A monthly subscription
2 - An annual subscription

If userID1 purchases a monthly sub, this blocks userID2 from purchasing the same sub while it’s active but userID2 *IS* able to purchase the annual sub from the same Play Store account, which is somewhat less than ideal.

So I guess the best approach would be to try and manage this based on entitlements rather than products?

Ideally I guess, I would check the current subscription status on the currently signed in play Store account and if either the monthly OR yearly sub is active there, I should block all purchases for userID2 if RC doesn’t acknowledge an active entitlement?


 


Hey @Rob Brooks! Happy to help here.

A possible solution here is to enable ‘Block Restores’ for your app in the RevenueCat dashboard, and before allowing a customer to make a purchase call `restorePurchases`. If any underlying purchases are owned by a different app user ID, the method will return an error and you can inform the user to switch accounts.

Alternatively, if you wanted to let purchases transfer between accounts, you could call restore purchases before allowing a purchase then checking entitlements to see if it’s already active to prevent another subscription from being purchased.

Let me know if that helps!


Hello @Rob Brooks !

I'm in the same situation as you and I'm managing the same way as you for the subscriptions. However, how you manage to block the userID2 to block all the purchases? I'm trying to do the same thing but can't find neither understand the doc of revenue cat to do that. Maybe someone from the revenue cat staff can help me on this ? Thanks


Hey @Rob Brooks! Happy to help here.

A possible solution here is to enable ‘Block Restores’ for your app in the RevenueCat dashboard, and before allowing a customer to make a purchase call `restorePurchases`. If any underlying purchases are owned by a different app user ID, the method will return an error and you can inform the user to switch accounts.

Alternatively, if you wanted to let purchases transfer between accounts, you could call restore purchases before allowing a purchase then checking entitlements to see if it’s already active to prevent another subscription from being purchased.

Let me know if that helps!

Although it’s not subscription and it’s one time product which are consumable, I prevents transfer, (in ios) and login with account A to purchase then login with account to purchase, two products belongs to account A both.
It’s ridiculous, it mean app user id is useless!!

And in android, it’s totally different, two products belongs account A and account B separately. I suppose android is the expected!


@simplist-app This doc should help you. I’ve linked specifically to “Keep with original App User ID”, which blocks transfers.

@hangyu-cde31f Can you clarify the issue you’re experiencing? It sounds like Google Play is working as expected while iOS is not? Which transfer behavior have you enabled in your project?


Jumping on this thread since its active. I have the following scenario:

Each account of my app has a unique appUserId from my backend feeding RevenueCat.

User logs into Account1 and purchases the monthly pro plan. The user logs out of Account1.

User logs into Account2 on the same devices with the same iOS/Play Store credentials and tries to purchase the monthly pro plan but gets hit with the subscription already being active with those iOS/Play Store credentials. 

Is there any way that the user can purchase the monthly pro plan on Account2?

The motivation behind this is that one user owns both Account1 and Account2 but I need the user to pay for the pro plan for each account.

Thanks in advance!


Hey @hasanzu ,

 

The user in this case would need to be logged into another app store account. This is a limitation by the app store themselves. The receipt on the device will stop the user from going through with  the purchase if it is done on the same store account. 


Hey @hasanzu ,

 

The user in this case would need to be logged into another app store account. This is a limitation by the app store themselves. The receipt on the device will stop the user from going through with  the purchase if it is done on the same store account. 

Thanks for the information.

 

Is there a workaround to this where I can have another offering that has replicated products (so technically they are different) and then if the user’s app store account already has one of the original products I can present a paywall of the “copied” products? If this is the case is there a way for revenuecat to identify the app store account and determine what they have active on my app since for my logic, each account on my app will have a unique appUserID so I can’t use that as an identifier between accounts.


Hi ​@hasanzu,

I’m not sure that this would work for you - since both accounts are attached to the same store account, even if the user was able to purchase a second product, both accounts would have access to both products. There really isn’t a way to differentiate two different app accounts while both are attached to the same store account. 


Hello everyone ! Thanks for the reply ​@jeffrey_bunn, I used indeed the doc that you send me and was a big help thanks. However, now I don't know if it is normal, but when I use Purchases.restorePurchases() it's like I have always a subscription elsewhere. I'm just testing in dev mode and in testflight, not in production at the moment but I would really like to understand if this is just a bug in sandbox and not in production? Or am I doing something wrong? Thanks for your help !


@simplist-app Hello! I apologize, but can you clarify the issue you’re experiencing? Are you saying that restorePurchases always returns an active subscription for your test user? If this is the case, it might be helpful to create a support ticket so we can look into specific users and logs for your app. Thanks!


@jeffrey_bunn Hello! Thanks for your reply! Indeed, this happens in any store account even without a subscription. When I first tried this feature works perfectly, but now this don't work anymore and every time I log in and call restorePurchases I can't never subscribe… I'm create a support ticket but I really need to know kinda quickly because I will need to publish this new version of the app because I did a new migration from Glassfy to Revenuecat because Glassfy is closing and I don't have much more time left until the end of the year… Thanks everyone!


@simplist-app Thanks for the additional context. I also see that you opened a support ticket and have been chatting with ​@kaitlin. To reiterate, you may want to create a brand new Sandbox account and log-in on your device during testing. This should ensure that you’re not uploading the same receipt (containing purchases), even if you’re changing the app user ID you provide to the RevenueCat SDK.


Reply