Reputation: 431
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 Auto-Renewable could not be canceled by a test user. How to cancel Auto-Renewable Subscription in Sandbox environment? And how to get the cancellation date in Sandbox environment? Thank you!
Upvotes: 43
Views: 29112
Reputation: 400
for iOS 18.2.1--> Settings-->Developer---> select Sandbox account--->then your appSubscription
Upvotes: 3
Reputation: 21
I had a similar issue where the "Cancel Subscription" button wasn't appearing as documented here: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox/testing_disabling_auto-renew.
For me, the "Cancel Subscription" button wasn't appearing because I had subscribed within the app rather via the Subscriptions page within settings as documented. After I subscribed via the settings page, the "Cancel Subscription" button appeared. Hope this helps.
Upvotes: 2
Reputation: 5954
You can do it in the following way:
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.
Upvotes: 44
Reputation: 1743
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.
Upvotes: 30