IAP Subscription Guide?

We’re looking at trying a subscription model for a new app, but can’t find documentation on how to use it in Corona.  Subscribing I’m sure is similar to doing a store.purchase like a normal IAP, but I’d assume there are event handlers needed for when a subscription expires, cancels, upgrades, or downgrades.

Has anyone done this?  Is there any documentation for how to handle this in Corona?

I don’t see why our existing IAP system wouldn’t work. There is extra work on the developer to track when subscriptions end and it’s the developers responsibility to disable access to features. This document describes the workflow:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

After reading that your transactionHandler will get events like any other purchase.  Your transaction listener function just needs to process various purchase and cancellation events that come in.

Rob

In that document they state “after a subscription is successfully renewed, StoreKit adds a transaction for the renewal to the transaction queue.”

So where in Corona do we access that transaction queue?

Your transaction listener function should just get events like you would a normal purchase. That’s the queue they are talking about. You will know it’s a subscription because of the ID and date information in the packet. Now our built in IAP store.* pre-dates StoreKit but the store.* functions should still handle subscriptions as far as I know.  There is at least one StoreKit plugin in the marketplace that you can try and use if for some reason our store API’s won’t handle it.

Rob

I don’t see why our existing IAP system wouldn’t work. There is extra work on the developer to track when subscriptions end and it’s the developers responsibility to disable access to features. This document describes the workflow:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

After reading that your transactionHandler will get events like any other purchase.  Your transaction listener function just needs to process various purchase and cancellation events that come in.

Rob

In that document they state “after a subscription is successfully renewed, StoreKit adds a transaction for the renewal to the transaction queue.”

So where in Corona do we access that transaction queue?

Your transaction listener function should just get events like you would a normal purchase. That’s the queue they are talking about. You will know it’s a subscription because of the ID and date information in the packet. Now our built in IAP store.* pre-dates StoreKit but the store.* functions should still handle subscriptions as far as I know.  There is at least one StoreKit plugin in the marketplace that you can try and use if for some reason our store API’s won’t handle it.

Rob