- Home /
Is it possible to give a one-off currency bonus with a non-consumable purchase?
Upon purchasing a special avatar, e.g. a Piggy Bank, is there a way to give the user a one-off stack of 1000 coins with it? Similarly, I would like to call a Unity CustomEvent to insert some extra analytics with each purchase, e.g. number of avatars already owned, levels played, etc.
Now obviously, it would only make sense for this bonus and custom event to occur once for the actual purchase. From what I have read, however, Unity IAP's ProcessPurchase method will be called upon multiple events: (1) purchase, and (2) restore purchases (which is automatic on Android or manual via a button on iOS). Furthermore, the restore purchases will also re-trigger when installing on a new device (Android). How can I prevent this one-off coin bonus or analytics custom event from re-triggering on each restore purchases event?