Restoring purchases is a mechanism by which your user can restore their in-app purchases, re-activating any content that had previously been purchased from the same store account (Apple’s App Store or Google Play).
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.
What happens when a user restores purchases?
When a user restores purchases, the Purchases SDK syncs the user’s device receipt with the RevenueCat backend. The device receipt contains unique information about the user’s transactions so that RevenueCat is able to pair the transactions to an app user ID and then subsequently unlock the appropriate entitlements.
RevenueCat offers a configurable option in an app’s settings to change the restore behavior in the event that a receipt has already been ‘claimed’ by another app user ID. By default, if a user restores purchases, and their receipt is already in-use by another app user ID, the receipt will be ‘transferred’ to the new user ID. This behavior removes the associated purchases from the old user, including their entitlements, and transfers them to the new user ID. Additionally, a webhook is sent indicating this transfer so you can reconcile the change in your own system.
The other configurable option ‘blocks’ the transferring of receipts to the new user ID. For example, if a receipt is in-use by a user ID, and a new user ID attempts to restore purchases from the same store account, RevenueCat would return an error message indicating that the restore failed.
While there are genuine use-cases for blocking restores, it should be noted that this is potentially dangerous for your users and should only be implemented if you have a support structure that can handle this type of behavior. For example, even if you have strict login/account mechanisms in place, users can still lose access to their account. If they aren’t able to restore purchases, they may not have the ability to access the content to which they are entitled. Additionally, they would likely have to rely on your own customer support team to re-grant access to their entitlements.
Where should I include my ‘Restore Purchases’ button?
Generally, users commonly expect a restore option to be available in two places:
- Paywall: since your paywall is where your users can purchase new subscriptions or other in-app purchases, it’s expected that it would also be where they can restore their previous in-app purchases.
- Settings: if your app includes an in-app settings screen, it’s good practice to include a restore option there as well. (Pro-tip: include a link to ‘Manage Subscriptions’ if the user has an active subscription).