Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restoring expired auto-renewable subscriptions

Following Apple guides, auto-renewable subscriptions are restorable -> device can send restoreCompletedTransactions to Apple servers and Apple will response with list of all completed transactions.

My question is, does Apple send all completed transactions ever? (only connected with purchasing non-consumable products and auto-renewable subscriptions, ofc)

For example: there is monthly auto-renewable subscription in my app. User installs my app in Jan, 2012. In May, 2012 he disables subscription auto-renewing. After a year, in Jan, 2013, he subscribes again. In March, 2013 he disables subscription auto-renewing again. Finally, in June, 2013 he subscribes again. In July, 2013 he tries to use "Restore purchases" function, what information will Apple send?

What information will Apple send to that device? Will Apple send information about all subscriptions, even those expired subscriptions?

P.S. The sense of a question is to get real experience of working with auto-renewable subscriptions and restoring information about them. Testing in sandbox sometimes returns very strange results.

Edit: Okay, so I have had enough testing to say, that yes, Apple sends all completed transactions ever, including transactions, connected with expired subscription, even if there was another subscription after it.

like image 634
Alexandr Paliy Avatar asked Jul 30 '13 09:07

Alexandr Paliy


People also ask

How do I restore my subscriptions on my Iphone?

Tapping 'Account' at the top of the screen. Choose 'View subscription options or restore purchases' Tap 'Restore' Enter your iTunes ID and password.

Does Apple auto renew subscriptions?

They automatically renew at the end of their duration until the user chooses to cancel. Subscriptions are available on iOS, iPadOS, macOS, watchOS, and tvOS.

What time do subscriptions renew Apple?

The subscription renewal process begins in the 10 days before the expiration date. During those 10 days, the App Store checks for any billing issues that might delay or prevent the subscription from being automatically renewed, for example, whether: The customer's payment method is active.


1 Answers

"Store Kit provides built-in functionality to restore transactions for non-consumable products, auto-renewable subscriptions and free subscriptions. To restore transactions, your application calls the payment queue’s restoreCompletedTransactions method. The payment queue sends a request to the App Store to restore the transactions. In return, the App Store generates a new restore transaction for each transaction that was previously completed. The restore transaction object’s originalTransaction property holds a copy of the original transaction. Your application processes a restore transaction by retrieving the original transaction and using it to unlock the purchased content. After Store Kit restores all the previous transactions, it notifies the payment queue observers by calling their paymentQueueRestoreCompletedTransactionsFinished: method " -- Apple Docs

like image 160
AAV Avatar answered Jan 03 '23 14:01

AAV