How to cancel Auto-renewable subscription by using test user in sandbox environment?
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:
The cancel date can be found in the receipt.
You can do it in the following way:
- Open iOS Settings
- Go to "App Store"
- Tap your sandbox account ("SANDBOX ACCOUNT" section at the bottom of the screen)
- Select "Manage"
- "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.