You would have to implement your own solution to keep of track in-app purchases. For this you would need to have a back-end server and user accounts. Your users would have to log into your app and their in-app purchases would be tied to their account for your app rather than their Google Play or iTunes account. This would be in line with what's allowed on each platform, because you'd be using the respective platform's payment solution but track the information about that payment on your own server so it could be used on another platform.
I have a few cross platform apps, and my opinion is that for most small apps it wouldn't be worth it to implement a solution like this just to track in-app purchases. However if you already have user accounts and sharing/syncing of data between platforms, then you it would be relatively simple to also add and track the users' in-app products.
If you do decide to do the extra work, you can look into Google's Firebase. It has a cross-platform database that makes implementing user accounts and syncing relatively easy and you wouldn't need your own server because you could use Google Cloud Functions (on Google's servers) for back-end operations.