Mukesh Shakya
Mukesh Shakya

Reputation: 445

Auto renewing in app purchase not getting any expired notification in iOS

I have implemented apple auto renewal subscription in my app but have not get any expiry notification from webhook. Can someone please help me?

Upvotes: 2

Views: 980

Answers (1)

romainsalles
romainsalles

Reputation: 2143

At the WWDC21, they announced a new Server-To-Server Notification (S2S) called EXPIRED (https://developer.apple.com/videos/play/wwdc2021/10174/?time=1030). This S2S will have different substates to know the expiration's cause: VOLUNTARY, BILLING_RETRY and PRICE_INCREASE.

With current S2S, you have different S2S, that won't cover all the cases:

  • CANCEL: Indicates that either Apple customer support canceled the subscription or the user upgraded their subscription. The cancellation_date key contains the date and time of the change.
  • DID_FAIL_TO_RENEW: Indicates a subscription that failed to renew due to a billing issue. Be cautious, when a grace period is defined, it doesn't always mean the subscription has expired (more info here)
  • REFUND: Indicates that App Store successfully refunded a transaction.
  • REVOKE: Indicates that an in-app purchase the user was entitled to through Family Sharing is no longer available through sharing. StoreKit sends this notification when a purchaser disabled Family Sharing for a product, the purchaser (or family member) left the family group, or the purchaser asked for and received a refund.

That's why, to ensure you revoke the access of a subscriber when the subscription expires, you have to re-check the subscription's validity with /verifyReceipt. S2S won't be enough until the new S2S arrive. And even then, you should always check manually since you could miss a S2S because of errors on your side or on Apple side.

I've written a full article on the subject that should help you fully understand this difficult subject: How to detect an expired subscription on the different app stores.

Upvotes: 2

Related Questions