Question

Understanding "Restore Purchase"

  • 4 January 2023
  • 2 replies
  • 1739 views

Badge +5

So I understand the basic idea of how the restore functionality works, but I dont see how this could become a problem in my application and thus wanted to ask if I am missing something here.

 

My users can only sign in with their phone number and alle purchases are only possible after a login.
Let’s say that a user changes phone, the user will get a new phone and sign in with the new phone but the same phone number - As the purchases are attached to the Play/Apple account and the purchases are also saved on their accounts within their app, they could switch phone and not lose any functionality.

 

Is there any scenario missing here where I would need “Restore Purchases” ? Apple rejected by production app due this functionality being missing, but I dont see, why I would need this.


2 replies

Userlevel 4
Badge +8

Here is our documentation on Restore Purchases: https://www.revenuecat.com/docs/restoring-purchases
Plus, a helpful article about when it's used and how it can be helpful: https://community.revenuecat.com/featured-articles-55/do-i-need-a-restore-purchases-button-391
 
The way that restore purchases works is that behind the scenes when the restore purchase method is called, the SDK is checking the receipt on the device and re-syncing it to RevenueCat's servers. The default restore behavior set to transfer, which means that if the app user id which is restoring is different than the app user id which was originally tied to the receipt, it will transfer the receipt to the new user id. 

 

Is there any scenario missing here where I would need “Restore Purchases” ? Apple rejected by production app due this functionality being missing, but I dont see, why I would need this.

By not including a method to restore purchases, users could lose access to existing purchases to which they are entitled. This isn’t ideal, so it is strongly recommended that you include some way for users to trigger the restoreTransactions method, even if you require all customers to create accounts. 

The way you have implemented the logging in shouldn’t normally have the need to call restore purchases. But one scenario could be if a user changes phone numbers and wants to access their purchases from their old number, in which case they would call restore purchases to sync the purchases on their Apple/Google account to their account with their new phone number.

 

 

Badge +5

Thank you for the information.

 

But even if the user changes phone number, the account would be transfered to the new number. With that transfer come the IAP.

 

I just added the button and am calling the corresponding function as it is a no-brainer anyways on my end.

Reply