1

I'm trying to follow the below codelab tutorial... regarding step 9 it is asking us to setup GCP+firebase backend to verify purchase,

https://codelabs.developers.google.com/codelabs/flutter-in-app-purchases#8

however my app only require a very simple in-app purchase feature... just a single consumable in-app product. No subscription No upgrade feature etc.

Is it a must to setup backend verification? I understand that RevenueCat is an option for in-app purchase, can RevenueCat replace firebase backend verification? which one is better ?

the package i'm using :

https://pub.dev/packages/in_app_purchase

icantcode
  • 142
  • 1
  • 15

1 Answers1

1

Yes, is preferable to use a back-end to verify purchases.

The process is very simple and you don't need to use a third-party providers. Note, is always a bad idea to a adopt solutions (like revenue cat) which can be harmful for your business in future!

In order to verify the purchase on nodeJS or any other back-end you have just to make a http request to iTunes or google API.

For Android/Google see: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.products/get
For iOS/Apple see: https://developer.apple.com/documentation/appstorereceipts/verifyreceipt

From your app you call the API on your backend with the data that IAP returned and on your backed you call the google/appstore API and get the success status.

Nelu B
  • 257
  • 2
  • 10