Disable restore IAP when same Apple account but different user account in application

In my app I have items to show just for users that are paying subscription. User can log to app by e-mail and password and can logout and on same device can log different users. Just classic custom account system.

My problem is that Apple Id in phone is still same. So when different user logged in he could restore purchases even that he didn't buy them.

So my question is how can I fix it? How can I connect Apple account to my custom account? Or at least somehow when trying to restore IAP check that this Apple account already have this subscription but different user was logged in. How other apps do this?

Leverage the Original_transaction_ID - you can relate this unique value for each purchase to account on your end - this way you can relate a single purchase to a specific account and enforce your business model and policies around entitling 1 or more accounts.

Disable restore IAP when same Apple account but different user account in application
 
 
Q