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

Question When a player refunds to GooglePlay or AppStore after an in-app purchase

Discussion in 'Unity IAP' started by Ai4, Jul 11, 2023.

  1. Ai4

    Ai4

    Joined:
    Feb 16, 2018
    Posts:
    3
    I use Unity's IAP
    I use Firebase to let players use email to create account passwords. When a player refunds to GooglePlay or AppStore after an in-app purchase, how do I know which account has refunded and how do I receive the refund message? I want to take back a sold item
     
  2. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,162
    If you are not saving purchases locally (for example in PlayerPrefs) but only access the received purchases from Unity IAP on each app launch, after a refund the purchase will be gone in that list.

    If you save purchases to a player's account on Firebase too, you obviously need to use server-server notifications and map the received transaction ID to your player account on Firebase. This is not an easy task and requires some database design and server or REST programming.
     
  3. Ai4

    Ai4

    Joined:
    Feb 16, 2018
    Posts:
    3
    I'm looking for teaching, I don't know if there are keywords to search for, thank you