Clear All Purchases in Unity IAP

I’m trying to make a “Clear Player Data” button in my game, and I’d like clear all the purchases the player made through the Unity IAP API. This way, if they press “Restore Purchases” right after, they would be able receive them back again. This being an alternative from them deleting/re-installing the app.

I noticed UnityPurchasing.ClearTransactionLog(), (https://docs.unity3d.com/ScriptReference/Purchasing.UnityPurchasing.ClearTransactionLog.html) but the documentation notes it should only be used for testing.

Is there a more official way to do this?

I’m using the latest version of Unity’s IAP API (as of January 22, 2017). Unity 5.5.0f3.

It totally depends on how you storing the purchased items if you storing them in Player prefs then simply clear the player prefs.

When user will call the restore purchases again then all the No-Consumable Items will be restored by this Unity InApp API again.