Felix O.
Felix O.

Reputation: 33

Can I use Firebase "in-app-purchase" event to handle Purchases safely


i have a Question about how Firebase handles the in-app-purchase Event, so i can know if it ise usable for Handling purchases.

My Questions are:

  1. Does this work on the Client?

    FirebaseAnalytics.LogEvent("in-app-purchase");
    

    If yes,

  2. How can I validate this data on the server (Cloud Functions), so that I can secure this process, so that I can be sure that every purchase is valid?

If the in-app-purchase event is not safe, how can i use an other option and which?

Upvotes: 2

Views: 2142

Answers (1)

enc_life
enc_life

Reputation: 5169

Short answer is no, the Firebase analytics event is not a validation that a real purchase was made. If you have subscription IAPs then it will be wildly inaccurate as well. The correct way to validate a purchase was made is through server-side receipt validation.

Upvotes: 3

Related Questions