Is it possible to use IAB (in app billing) to handle subscriptions? Specifically, to detect the start and end of a subscription?
I've found a discussion on doing so with the GoogleBilling plugin:
http://giderosmobile.com/forum/discussion/4475/status-of-google-billing-subscriptions/p1Does anyone know of a way to do this with IAB or any method that supports both the Play Store and iTunes?
Paul
Comments
If that's true, then using iab:restore() and checking the results for the product ID of a subscription should be all that's needed to determine if the user is currently subscribed.
Or am I missing something?
Paul
Yes, IAB will have a PURCHASE_COMPLETE event for a subscription item (at least on the Play Store), both at the time a subscription is purchased, and during an iab:restore(). That's all good except: The purchase event contains only the product ID, and no receipt ID. So it's possible to tell if a user is still subscribed (you get that product ID during a restore) but without a receipt ID, there's no way to know if a user subscribed on a different device. In my case, here's why that's problematic:
My app will entitle a user to an add-on every week as long as they are subscribed, and those accumulate. If the user waits 10 weeks between subscribing and running the app again (at which time they are still subscribed), they get 10 add-ons. The app can tell when a subscription starts (when a purchase_complete happens that isn't within an iab:restore()), so that's manageable. What I was hoping to implement was the preservation of entitlements for users who replace a device. If there was a receipt ID passed through IAB, then my server (which keeps track of when each receipt was first reported) would know how long the subscription has been active, and thus how many add-ons the user is entitled to. Lacking a date or receipt ID, there's no way to tell how long a subscription has been active, in the case of someone running on a new device, or after an uninstall and reinstall.
Paul
Likes: pie, antix