Identifying subscription changes server side (same group different premium content)

We are a cross platform service with an App and a Web service, user who purchase a subscription on the AppStore can access the same content via the web.

We have 3 different products and for each tier several subscriptions durations availble (monthly, annual):
1. Bronze (monthly, annual)
2. Silver (monthly, annual)

3. Gold (monthly, annual)


If a user purchase a subscription the client notify our server site about the purchase with the receipt and the server does the validation and according to the tier open the premium content. Towards the end of the perios the server issue avalidation to check weather the user canceled the subscription. If the subscription was cancelled the premium content is blocked across the platforms (App & Web).


Our concerns is what will be the process with iOS 10 new Groups model where the user will be able to shift between products from iTunes (upgrade from Silver to Gold or Downgrade from Silver to Bronze) and than will try to access the service from the web. How our server will be aware of the change in plan?

When a new receipt is validated it will have the new expiration date on it (expires_date).


If an earlier receipt is validated it may or may not have the latest_receipt_info field in it that will contain the expires_date. These are the following use cases:

1) DEPRECATED: the old receipt is an iOS6 receipt obtained from transaction.transactionReceipt. transaction.transactionReceipt has been deprecated. But such old receipts might continue to be serviced by the Apple servers. Or the Apple servers might start to fail on these deprecated receipts. Also, these deprecated receipts may become unavailable to the app.

2) UNDOCUMENTED: just like the now deprecated transaction.transactionReceipt, the newer receipts obtained from [[NSBundle mainBundle] appStoreReceiptURL] seem to generate a latest_receipt_info field that contains the expires_date filed. This feature is undocumented and could disappear at any moment. If you wish to rely on it, submit an Enhancement Request through the bug reporter system requesting this feature continue. Use the iTunes Connect section for this feature sicne it is a feature of iTunes Connect not the App itself.

3) DOCUMENTED: the only documented approach to this validation issue is to require that the user open the app, refresh the recipt and send the receipt to your server for validation.

Thanks for the prompt reply.

Does the the transaction.transactionReceipt contain the new product the user upgraded/downgraded? I know how to relate to the expiration, what I'm missing is what is the new package he upgraded/downgraded too.

I know what I can extract from the receipt the "expires_date_formatted"/"expires_date" but what will the "product_id" represent in upgrade/downgrade?

I believe there is one product_id per autorenewable family. A family consists of a set of different durations. You determine the duration that was chosen by using the expires date.

This is correct only for Family of products (up to iOS 9). With the new groups in iOS 10 it is possible to define identical durations for the same group thus product id is different.

Identifying subscription changes server side (same group different premium content)
 
 
Q