0

We have been testing In App purchase Server to Server notifications in sandbox environment over and over. Apple's documentation here states for the Cancel type notification that:

Indicates that the subscription was canceled either by Apple customer support or by the App Store when the user upgraded their subscription. The cancellation_date key contains the date and time when the subscription was canceled or upgraded.

As per this, we should receive a Cancel notification when we perform an upgrade of a product from the subscription group but we have been receiving a INTERACTIVE_RENEWAL instead? Is this because we are testing in Sandbox environment. Do we get the CANCEL in production, and if yes whether we should still expect another INTERACTIVE_RENEWAL in production as well.

mickeymoon
  • 4,820
  • 5
  • 31
  • 56

3 Answers3

3

You'll only receive a CANCEL notifications if the subscription was refunded by Apple support. You should expect the INTERACTIVE_RENEWAL events for upgrades.

enc_life
  • 4,973
  • 1
  • 15
  • 27
  • True, that's what I have observed. But Apple's documentation clearly mentions that for an upgrade also, `CANCEL` should appear. Do you have any supporting testimony for the same. Also, I have tested only in Sandbox, not sure if production may have a different behaviour. – mickeymoon Jun 11 '19 at 10:23
  • 2
    The WWDC 2019 mentions in one of their presentations that you should expect two notifications `CANCEL` and `INTERACTIVE_RENEWAL` in case of upgrades. – mickeymoon Jul 17 '19 at 13:15
1

Is this because we are testing in Sandbox environment. Do we get the CANCEL in production, and if yes whether we should still expect another INTERACTIVE_RENEWAL in production as well.

Correct. This behavior is due to Sandbox env. In Production, you would get both the notification.

From Apple Doc : CANCEL - indicates that the subscription was canceled either by Apple customer support or by the App Store when the user upgraded their subscription. The cancellation_date key contains the date and time when the subscription was canceled or upgraded.

https://developer.apple.com/documentation/storekit/in-app_purchase/enabling_server-to-server_notifications

Yogesh Kaushik
  • 440
  • 3
  • 14
0

If you check the documentation for CANCEL today (20210404) you can see that the CANCEL notification no longer mentions the part that it is sent when there is an upgrade. They changed the documentation (and, I suppose, the behaviour too), but they didn't make an explicit mention to that (a changelog, for example), and they don't include modification time for documentation pages. So it is very difficult for us, as developers, detect the changes in an easy way.