Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Restore purchased items after app restart

Discussion in 'Unity IAP' started by Dinochrome, Nov 29, 2019.

  1. Dinochrome

    Dinochrome

    Joined:
    Apr 23, 2018
    Posts:
    19
    Hello! I am quite new to IAP development and cannot find an answer on how I can recover purchased items after the user closes the application. Let's say a user bought a “character unlock”. I can’t save this information on the device, as it becomes vulnerable to hacking. I guess I should ask the store (Google Play / App Store) what products the user bought. But I can not find the necessary API ...
    Any help would be appreciated.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    You can check the receipts during IAP initialization. Otherwise, you'll need to persist the purchase information yourself, some studios save purchases to the cloud.
     
    Dinochrome likes this.
  3. Dinochrome

    Dinochrome

    Joined:
    Apr 23, 2018
    Posts:
    19
    Thank you! That's what I was looking for!