Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cancel Auto-renewable subscription by using test user in sandbox environment?

I use Auto-Renewable Subscription in my application. When I test it I want to cancel Auto-Renewable Subscription in Sandbox environment, but I find out it couldn't cancel Auto-Renewable by use test user. How to cancel Auto-Renewable Subscription in Sandbox environment? And how to get the cancellation date in Sandbox environment? Thank you!

like image 236
white0702 Avatar asked Apr 23 '16 07:04

white0702


People also ask

How do you cancel sandbox subscription?

Yes, you can cancel your subscription at any time. To do so, reach out to our Customer Happiness Team through the Sandboxx app.

How do I check my sandbox subscription?

Once you have logged into a sandbox account using this method, you can then go to the Settings app, tap “iTunes & App Store”, then scroll to the bottom to the Sandbox Account section. Here you can log in and out of different sandbox accounts for testing.

What is Sandbox subscription?

In the sandbox environment, subscription renewals happen at an accelerated rate, and auto-renewable subscriptions renew up to 12 times after the initial purchase. This enables you to test how your app handles a subscription renewal, a subscription lapse, and a subscription history that includes gaps.


2 Answers

You just have to wait. From Apple's documentation:

Additionally, test subscriptions only auto-renew a maximum of six times.

Your test subscription lasts way less than the real duration, from 3 minutes to one hour. All renewing durations can be found on the following page:

https://help.apple.com/app-store-connect/#/dev7e89e149d

The cancel date can be found in the receipt.

like image 133
lorenzo Avatar answered Oct 27 '22 00:10

lorenzo


You can do it in the following way:

  1. Open iOS Settings
  2. Go to "App Store"
  3. Tap your sandbox account ("SANDBOX ACCOUNT" section at the bottom of the screen)
  4. Select "Manage"
  5. "Edit subscription" screen will open and there you'll have a "Cancel subscription" option for your Sandbox subscription.

With a small delay (it was several minutes for me) you'll get a server notification with "notification_type": "DID_CHANGE_RENEWAL_STATUS" and "auto_renew_status": "false". This means that the subscription is still valid, but it won't be automatically renewed when the current subscription period expires.

If you want to test refund (not a regular cancellation), then it's impossible as far as I know.

like image 29
algrid Avatar answered Oct 27 '22 00:10

algrid