Do I need a 'Restore Purchases' button?

  • 8 September 2021
  • 2 replies
  • 2221 views

Userlevel 6
Badge +8
  • RevenueCat Staff
  • 474 replies

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).

2 replies

Badge

Question - does RevenueCat handle restore errors for my app or do I need to handle any errors that come back from Apple once a user hits Restore?  I noticed that RCat does handle errors on purchases; is this the case on Restores?  I noticed too that if a user hits my Restore button and he/she was never subscribed, there is no error in the console.  It simply shows the following: 

DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:<removed>

DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.

DEBUG: ℹ️ SKReceiptRefreshRequest started

DEBUG: ℹ️ SKReceiptRefreshRequest finished

DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/CCA9527D-E5D5-46F8-978C-2998EA10B7B0/StoreKit/sandboxReceipt

INFO: ℹ️ Parsing receipt

INFO: ℹ️ Receipt parsed successfully

Is there some way to provide feedback to the user that he/she should purchase a subscription before trying a restore in this case?  Can I reliably assume that if there was no error AND the entitlement is not active, then the user has not previously subscribed and should be guided to subscribe first?  Thanks.

Badge +4

Hi @cody I don’t see the point of using the ‘Restore’ button because, I do invoke for customerInfo when my app starts and set the state of either subscribed or not and unlock the pro content accordingly. 

However appstore wants you have ‘Restore Purchase’. How do I best use of this in this scenario?

Reply