Skip to main content
Question

Prevent transfer to Anonymous ID

  • November 26, 2025
  • 1 reply
  • 15 views

Forum|alt.badge.img

In our iOS app we want to achieve the following behavior of `restorePurchases()`:

  1. If the purchase was made on anonymous ID and user logged in - transfer subscription to the user ID.
  2. If the user credential switched but Apple Account stays the same - transfer to the new user.
  3. If subscription was associated with a user and then that user logged out - we want to show message “This subscription is already linked to another account. Please sign to that account to restore”.

How to implement the user story 3? This is required to prevent double spent and subscription duplication - when the one subscription becomes available on multiple accounts. Is there any built-in checks allowing to tell if the subscription is already linked to a non-anon user?

We use ‘Transfer to new App User ID’ setting for restoring.!-->

 

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • December 3, 2025

Hi, for your use case your current restore behavior “Transfer to new App User ID” is best because it covers your first two cases. To clarify, for your last case you mean that the user switches their Apple account or that they switch their RevenueCat app user id? If they change Apple accounts and you want to prevent them from accidentally purchasing the subscription again what you can do is only display the paywall if they do not have that purchase. You can do this by checking their customerInfo and manually showing this or you can use our presentPaywallIfNeeded method, see our docs:

https://www.revenuecat.com/docs/customers/customer-info#checking-if-a-user-is-subscribed

https://www.revenuecat.com/docs/tools/paywalls/displaying-paywalls