How to handle IAP subscription


I’m trying to implement IAP to my game. I have only one item, which is a SUBSCRIPTION and have 3 terms (monthly, quarterly and annually). I have successfully implemented the SDK and everything, so I’m all okay on that side.

My question is how to detect and store a valid subscription. See the following scenario

  • Invoke a purchase request - SDK returns a result. With that result, - for now let’s skip the validation part - I just save it locally that the subscription has been bought. Along with that I also record the expiration date.
  • User deletes the app. But their subscription still exists. Next time the user opens the app, I’d have to check if the user has an active subscription.
  • The subscription has reached its expiration date, however it is a recurring one and Amazon has extended the subscription. I don’t see an update in PurchaseUpdates return. How can I still check that the user has extended its subscription?