Skip to main content
Solved

Restore Purchases is Transferring Entitlements Across Sandbox Accounts

  • February 20, 2025
  • 2 replies
  • 31 views

Forum|alt.badge.img
  • New Member
  • 2 replies

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?

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • 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
  • 2 replies
  • 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 :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings