iOS in-app-purchases and subscriptions

I’m currently implementing in-app-purchases with Ionic native and the plugin-cordova-inapppurchase plugin.

With iOS, it looks like calling restorePurchases() returns ALL previous transactions?

I’m struggling to work out how to, for example, find out which products are currently subscribed to so I can display that to the user. I could save a list locally of which products have been purchased which would work fine, however if the user removed and reinstalled the app, restoring purchases should re-enable features but the Apple service doesn’t seem to return information that is useful for this.

Not sure if that makes sense but any help and information would be greatly appreciated!

1 Like


Im using IAP’s with my ionic 2 app and the InAppPurchase.restorePurchases() method return purchased items for the apple id in use. Perhaps I misunderstand your issue. I have a “restore” function in the app where a user can re-download previously purchased items, if they were somehow lost (new device etc…). I use the InAppPurchase.restorePurchases() method for just that.

I’m just a bit confused because as I mentioned above…

It doesn’t just return a list of currently active purchases, it returns a list of all transactions by that user (which I think is all purchases and subscriptions made by that user) with state: 3

I want to be able to show the user a list of available products, but highlight which ones they are already active for them.

Also, the functionality I have is a subscription which allows the user of my app to gain access to more content. How can I check if the user if allowed to see this content (i.e. they have an active subscription)?

1 Like

Hi @mbrookson

I have exactly the same question.
Have you found a solution?



A while back I was speaking with the Ionic guys and asked them to add to the Ionic native library as the API looks much more usable than the first plugin.

It has since been added ( however I am yet to try it out.

Guys, I know its a bit late to the “party” but i’m working with the in-app-purchase-2 plugin and faced a few setbacks! Although the docs on the plugin are very detailed they miss a few important things… For instance: its not clear how “store.refresh() and store.ready()” work together. In case you’re implementing auto renewed subscriptions you have to validate your receipt and for that you need to keep looking in the src files what exactly you need to return from your server in order to have the produc.verified dispatched! Anyway… its been a few days i’m working on it… and it’s not easy!!