Flow:
- user makes in app purchase on android/ios
- app store charges user and then sends purchase token to front end app
- front end sends purchase token to my backend server for validation and to register the purchase with my backend to update user's state.
- error occurs here -> front end app closes
- user state on the backend was never updated because the purchase token was never received and never validated.
In the above scenario/flow, the user paid, but my backend server is not aware of the payment, hence, whatever the user paid for is not given to them when they open the app again
How is this scenario handled/solved?