Restoring purchases is a process that you should allow for user's who have either changed devices or reinstalled your application and hence need to gain access to their purchases again.
This process must require user interaction in order to pass the App Store review process. You should provide a button somewhere in your application to initiate this process.
For more information on the concepts you can read the Apple documentation here.
The restoring purchases process starts by calling the
restorePurchases function and concludes with either
a success (
InAppBillingEvent.RESTORE_PURCHASES_SUCCESS) or failure (
restorePurchases you will a receive
which will contained
Purchase objects in the restored state having the original purchase
variable representing the original purchase transaction.