Skip to main content
Answer

Restore Purchases is Transferring Entitlements Across Sandbox Accounts

  • February 20, 2025
  • 2 replies
  • 232 views

Forum|alt.badge.img

I have an app that offers annual, monthly and lifetime subscriptions. They all access the same ‘premium’ entitlement.

 

If a new in-app user account is created and I restore purchases, I am able to successfully transfer entitlements between users, provided that the parent App Store Sandbox account is the same.
 

I’m using web-hooks, so whenever a ‘transfer’ event is fired, I can update my database to make sure it is in-sync with RevenueCat. I remove any subscription information from the ‘transferred_from’ user, and apply it to the ‘transferred_to’ user.

 

This is working perfectly for restoring monthly and annual subscriptions. But there are issues for lifetime purchases.

  1.  Purchase a lifetime subscription using App Store account ‘x’.
  2.  Sign out of Sandbox account ‘x’, and sign into a completely new, unrelated Sandbox account ‘y’ with no purchase history.
  3.  Create a new in-app account using the new Sandbox account.
  4.  Call restorePurchases.
  5.  I would expect that nothing should happen, since Sandbox account ‘y’ is brand new, with no previous purchases. However, a ‘transfer’ event is being fired by RevenueCat and now the lifetime entitlement is transferred across Sandbox accounts from ‘x’ to ‘y’.

 

I’m rather confused about why RevenueCat is firing a transfer event for completely different App Store Sandbox accounts. Thankfully, this is only happening for lifetime purchases. 

 

Is this just a Sandbox issue? Do I need to ‘Clear Purchase History’ inside the Sandbox settings after I have purchased a non-consumable lifetime subscription in order to stop this from happening?

I’m currently unable to test restoring purchases at all, since now the lifetime entitlement is being passed between every account.

Thank you in advance for your time.

Best answer by Ryan Glanz

This must be a sandbox quirk, as we don’t see it in production. Does it still occur if you clear the purchase history, and even delete/reinstall the app after creating a new sandbox Apple ID?

This post has been closed for comments

2 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • Answer
  • February 24, 2025

This must be a sandbox quirk, as we don’t see it in production. Does it still occur if you clear the purchase history, and even delete/reinstall the app after creating a new sandbox Apple ID?


Forum|alt.badge.img
  • Author
  • New Member
  • February 24, 2025

I can confirm that deleting the iOS app, rebuilding and clearing the purchase history on the new account (even before making any purchases on it) has successfully resolved this issue.

Obviously not an ideal flow as it adds a little time, but it stopped RevenueCat from sending transfer events when attempting a restore on a fresh sandbox account.
 

Thank you for the suggestion :)