5

I am implementing auto-renewable subscriptions in iOS and want to be able to test the scenario where the user cancels the subscription but I am unable to do so because when I try to manage subscriptions with the sandbox account the app store wants me to associate a payment method with the sandbox account but in my experience once I do that the sandbox account is no longer valid.

Is it even possible to test cancellations or do I just blindly code for cancellations? I have search high and low and have not found anyone who has been able to manage subscriptions in a sandboxed environment.

dtrotzjr
  • 928
  • 5
  • 18

2 Answers2

2

I realized today that I was thinking about this all wrong and I can see why its not as necessary to be able to manage subscriptions. I was thinking that the 'Cancellation Date' field would reflect when a user cancel's (or really just opts out of auto-renewing) their subscription. But I was mistaken this field is only for the times when a user contacts Apple Support and requests to cancel early and receive some sort of a refund, and this is not something that is managed directly by a user.

dtrotzjr
  • 928
  • 5
  • 18
2

Have you tried using a TestFlight build? You can do sandbox IAP testing via TestFlight with a "normal" iTunes account that has a payment method. I would assume that means you could try out canceling the subscription.

Stephen Johnson
  • 5,293
  • 1
  • 23
  • 37
  • 1
    I'd have to contact Apple support to actually cancel a subscription to see the 'Cancellation Date' field filled in. Managing a subscription only opts out of auto-renewing the subscription. – dtrotzjr Aug 20 '15 at 19:10
  • That is true. You should be able to go to your Apple ID in the App Store and manage your subscription to at least be able to test turning off the auto-renew for the subscription. – Stephen Johnson Aug 20 '15 at 19:39
  • They auto-renew 5 times in the sandbox environment and the time scale is significantly compressed (1 year == 1 hour) but my understanding is that the expiration date is only to the end of the current subscription term so the app has no info beyond the current subscription which makes sense. So in the end it really isn't a big deal. – dtrotzjr Aug 20 '15 at 23:50