IAP check if there is something to restore

I'm required to offer the user a way to restore their purchases (from another device). For this I am required to add a button. I would like to only provide this button if there is actually something to restore. Is there a way to query if the device owner has any receipt for the app.