How to recognize upgrade, downgrade, crossgrade in notification v1

assume that I have this 5 PRODUCT

  1. I purchase Weekly, then I switch to Monthly, it is upgrade, will receive INTERACTIVE_RENEWAL, indicate that new plan takes effect immediately.
  2. I purchase Yearly, then I switch to Monthly, it is downgrade, will receive DID_CHANGE_RENEWAL_PREF, indicate that new plan takes effect at the next renewal.
  3. I purchase Quarterly, then I switch to Quarterly2, it is crossgrade, will receive INTERACTIVE_RENEWAL, indicate that new plan takes effect immediately; Because the subscriptions are the same duration.
  4. I purchase Quarterly, then I switch to Monthly, it is crossgrade, will receive DID_CHANGE_RENEWAL_PREF, indicate that new plan takes effect at the next renewal; Because the durations are different.

So, if I receive INTERACTIVE_RENEWAL notification, how can I recognize it is upgrade, or crossgrade to same duration product. If I receive DID_CHANGE_RENEWAL_PREF, how can I recognized it is downgrade, or crossgrade to different duration product.

Does anyone can help me, thanks so much!! Orz

Replies

I would recommend switching to V2 App Store Server Notifications, which have subtypes for DID_CHANGE_RENEWAL_PREFERENCE, UPGRADE, DOWNGRADE, or omitted, for an upgrade, downgrade, or crossgrade respectively. https://developer.apple.com/documentation/appstoreservernotifications/subtype

If you are using V1, you will need to determine what the last active transaction was, compare their product ids, and determine if it was an upgrade or crossgrade.

  • thanks for your reply, helps me a lot. But may I ask does there any api could return us the order of the product in subscription group?

Add a Comment

thanks for your reply, helps me a lot. But may I ask does there any api could return us the order of the product in subscription group?