I am quite new to in-app purchases in flutter. I am writing a side-project app alone, and I would like to allow the user to upgrade the app from a free version to a paid one.
I saw in the documentation that the in_app_purchase package is the good tool for that (after setting up the app stores). I also found this codelab about the topic.
My question is: Is there a way to veriy the purchase Without a backend? I want to do a non-consumable purchache, and I wonder why do I need a backend to verify that? The package returns the items owned by the user, and in my case I belive that is enough.
InAppPurchase.queryPastPurchases()
Is there a flaw in my logic here? In the codelab, the tutorial states that
You can securely verify transactions. | You can react to billing events from the app stores. | You can keep track of the purchases in a database. | Users won't be able to fool your app into providing premium features by rewinding their system clock.
but these seems like unnecessary extra safeguards for me, if I use the said package...
I saw the related questions, but they seem to be more than 10 years old now.
As the other answers tells, the official package does not support verifying purchaches for a reason.
Hovever, I found that this open source lib https://pub.dev/packages/flutter_inapp_purchase does support the check, and I was able to use it without any problem.
Here is my implementation for reference.