Solved

Unwanted purchase transfer

  • 10 November 2021
  • 10 replies
  • 1396 views

Userlevel 1
Badge +1

Hello,
we are trying to implement IAP in an iOS app and are running into weird behavior regarding transferred purchases.
We are signed in on two different iOS devices with an apple sandbox account. On the two devices, we use different app user ids. Now, we first made a subscription purchase on one device and canceled it afterward again. Then, we made a second subscription purchase on the other device (different app user id, same apple sandbox account).

Whenever the app is started, Purchases.shared.logIn is called with the app user id of that device. With that, each time in the revenue cat dashboard, the purchase of the second device is transferred to the app user id of the last device we started the app on.

This does not seem to be the desired behavior here – at least not what we need. We would expect the purchase to always be associated with the app user id which was used to make the purchase. In this example, the two app user ids are not related to each other. The only connection is the apple sandbox account. Can we prevent the purchase transfers?

icon

Best answer by cody 12 November 2021, 20:32

View original

10 replies

Userlevel 6
Badge +8

Hey @Noah Peeters!

This actually seems to be the expected behavior as of now- if a single Apple account restores using different app user IDs, we’ll remove access from the first user and grant access to the restoring user. You can read more about our restore behaviors in our documentation here: https://docs.revenuecat.com/docs/restoring-purchases

It sounds like what you are looking for is the ‘Block’ restore behavior- but you’ll want to be very careful as this could prevent a user from accessing their subscription if they aren’t able to get logged in with their app user ID that the receipt is currently attached to.

Userlevel 1
Badge +5

Hi @cody, if I understood @Noah Peeters correctly, the purchase is not being explicitly restored by the users but RevenueCat is transferring it on its own. This is something we seem to be experiencing as well and in my opinion ought to be considered a bug, not a feature. It should be possible for two users to share an apple id but not share a purchase, such that one of the users can make a purchase and have its entitlements while the other user does not get the entitlements unless they explicitly leverage the “restore purchases” mechanism and the purchase is transferred. An example of where this might apply would be with shared devices in a family environment, where a parent could have their account with a purchase on their iPhone but their iPad that has the same Apple id is used by their child with a separate account and without any entitlements.

Userlevel 1
Badge +1

This actually seems to be the intended behavior by RevenueCat. As far as I know, you either have to accept this behavior or you have to switch to the block restore behavior – which has its own downsides.

The scenario you are describing in the last sentence, would work just as intended with the block restore behavior. So if that’s what you’re looking for, this behavior is probably right for you. Just make sure to properly handle the blocking.

Userlevel 1
Badge +5

I agree that it seems to be intended behaviour by RevenueCat, but what I’m arguing is that it should not be and is insufficient to handle reasonable use cases. I understand that the block restore behaviour would support the last scenario I mentioned, but there are other reasonable scenarios where it would cause problems, such as a user deleting their account without cancelling their subscription, creating a new account, and wanting to restore their subscription to the new account. The behaviour I was hoping to have as an option is that purchase transferring/restoring is only ever done when the user explicitly uses “restore purchases” so that I as a developer can make the right product decisions and tradeoffs for my use case instead of RevenueCat as an sdk prescribing its own unwanted opinions on my user flows.

Userlevel 1
Badge +4

I have a situation recently where purchases have been transferred without the user initiating. 

 

Wondering how and why that would be expected behaviour? 

Badge +1

I have a situation recently where purchases have been transferred without the user initiating. 

 

Wondering how and why that would be expected behaviour? 

Hello
the same situation happened to me. how did you solve the problem?

Userlevel 1
Badge +4

Never got to the bottom of it, thankfully it was the only case I have come across. 

Badge +3

I have a situation recently where purchases have been transferred without the user initiating. 

 

Wondering how and why that would be expected behaviour? 

Same thing happened to me too.

Badge +1

Me too, My app is supported across multiple devices.  I use my own UserID at purchase then check it for verification via the API.  

 

Try checking the General > Project Settings 

Transferring purchases seen on multiple App User IDs

Select Keep with original App User ID

https://www.revenuecat.com/docs/restoring-purchases 

Badge +3

Me too, My app is supported across multiple devices.  I use my own UserID at purchase then check it for verification via the API.  

 

Try checking the General > Project Settings 

Transferring purchases seen on multiple App User IDs

Select Keep with original App User ID

https://www.revenuecat.com/docs/restoring-purchases 

Same situation, and your link solved my problem, thanks :)

Reply