How to upgrade to receive an automatic renewable subscription

I am trying to implement an automatically renewed subscription in the application, it works as follows:

  • User buys a subscription.
  • The application receives a receipt and sends it to my web service.
  • My webService checks receipt, changes the user role from Free to VIP, and also writes a receipt.

Now the question is: when is the expiration date, should I check receipt in my web service or application?

  • If it is in webService, should I try to check the old receipt (saved) and Apple will return the latest version to me if it is updated or canceled?

  • If this application, how should I continue? Is there any notice from storeKit when a subscription is renewed or canceled?

If the correct approach is the second (application), since my webService controls whether the user role is Free or VIP, every time an update occurs, I will have to send the latest receipt to my web service, so it can correctly manage the user role. This is why I need to know how and when to send the latest receipt.

+4
source share
1 answer

A more useful approach is the first of your web services. When you try to verify an old receipt (saved), and Apple can respond in one of the following two ways:

  • , ​​ .
  • , ​​ .

, , , VIP .

, , 12 24 , .

+7

Source: https://habr.com/ru/post/1570916/


All Articles