how does Auto-renewable in app purchase / subscription renew itself in iphone
-
27-10-2019 - |
Question
I am trying to understand how the auto-renewal part works. So far i went through
Verify receipt for in App purchase
http://www.phpriot.com/articles/verifying-app-store-receipts-php-curl
and Apple Documentation. I have got the App purchasing part complete but am not able to get the auto-renewal flow of it.
when the purchase expires the apple server response has status:21002 the receipt is valid but has expired.
what i am trying to understand is WHO triggers the new purchase? app store itself in the backend? How does the app get to know that renewal has happened? or in other words, how does the renewal certificate reach application for processing?
Br, Darshan
Solution
The App Store does the charging when the auto renewable subscription is expired. Your application is not informed when this happens. When you validate an auto renewable receipt that has been extended your server receives an additional receipt with the new expire date.
Documented here: http://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/RenewableSubscriptions/RenewableSubscriptions.html