So for example I have an app in which users can register and log in using any account they created.
Then there's an in-app monthly subscription option inside the app that lets the user access premium features.
If the user buy monthly subscription, of course I want to tie that subscription to the current user account they're currently logged in.
If the user then logs out and then re-login again as a different account, I don't want the user to be able to "restore purchases" the subscription from the previous app account into this app account.
Here are some problems:
I read from some sources, Apple wants your app to provide restore button. As I mentioned before, I want the in app purchase tied to the app account, and do not wish the user can restore purchases to each account they logged in with.
Even if I don't provide restore button, if the user is trying to make the same transaction, Apple will process this transaction as normal transaction, but does not charge the user again. This is also not something desired.
This is, to an extent, also how Google Playstore works, I believe.
How can I implement this?