Tracking Automatic Subscription Revenue in AppsFlyer (iOS)


When you purchase a subscription on iTunes, it automatically renews each subscription period. However, there is no obvious trigger for developers to send this new revenue to AppsFlyer.

From AppsFlyer’s perspective, subscriptions are no different than purchases, but since the transactions are generated by the App Store, and not by the app initiating a purchase, some additional logic is needed to ensure the purchase is sent to AppsFlyer.

Sending Purchases to AppsFlyer

The method for handling this is as follows:

1.  The app is notified of a new transaction only when it is launched.

The transaction is no different from a first subscription purchase or any other purchase. The app checks for transactions, and fulfills them to support in-app purchases or subscriptions in general.

2.  When a renewal occurs, on the device in the app, the developer becomes aware that a renewal has occurred.

See the Apple documentation on this here

The relevant section states:

“After a subscription is successfully renewed, Store Kit adds a transaction for
the renewal to the transaction queue. Your app checks the transaction queue on
launch and handles the renewal the same way as any other transaction. Note that
if your app is already running when the subscription renews, the transaction
observer is not called; your app finds out about the renewal the next time it’s

3.  If the app already implements a transaction queue observer, during that process they are already “fulfilling” the user's purchase by delivering the content the user paid for as part of the subscription, or removing the gate which is keeping them from subscription only content.

4.  The developer informs AppsFlyer about the new revenue as a purchase event, either via the SDK “trackEvent” methods, or by sending the data to their servers and firing an event from there using s2s IAE.

The developer should make sure to fire the data around the time they are ready to call this method:

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];

The entire flow for fulfilling a transaction out of the queue is documented here


Subscription Revenue Tracking does not support Receipt Validation.

Was this article helpful?
1 out of 3 found this helpful