62

Currently with In app purchase the only way to cancel an auto-renewing subscription is to do the following with the device:

Settings > Store > View my account > Manage my subscription

Is it possible programmatically to link directly to the Manage my subscription page in the app store? I know I can open the app store via something like

NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com"];
[[UIApplication sharedApplication] openURL:url];

I have seen other apps do this but I can't seem to figure out how.

Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156
OneDimensionalmc
  • 891
  • 2
  • 7
  • 7

10 Answers10

112

Using a URL

According to Apples article Handling Subscriptions Billing and WWDC 2018 Session 705 the following url can be used to link to the manage subscription page:

https://apps.apple.com/account/subscriptions

Using StoreKit/SwiftUI (iOS 15+)

UIKit: Use StoreKits showManageSubscriptions(in:) (Documentation).

SwiftUI: Use SwiftUIs modifier manageSubscriptionsSheet(isPresented:) (Documentation).

ChaosCoder
  • 3,085
  • 1
  • 22
  • 23
  • This should now be the preferred answer. Works, thank you! – Markus Aug 02 '18 at 14:19
  • 3
    This seems to be the "official way", but in when I open the URL via `openURL()`, on iOS 12, first Safari opens, forwards to another site `finance-app.itunes.apple.com`, where a popup shows up "Open this page in iTunes Store?". If you tap "Open", the "iTunes Store" app opens, and the desired screen appears as a modal overlay. Ugh. Is there a smoother way, without redirects, preferably so that either the Settings app or the App Store app opens? (That's what I would expect as a user.) – Theo Sep 25 '18 at 14:11
  • 2
    @Theo see answer from mklb: https://stackoverflow.com/a/53275848/686902 – bryanjclark Dec 12 '18 at 04:36
  • 3
    The new one https://apps.apple.com/account/subscriptions redirects to App Store, and *only works on iOS 12 or later*. The old one https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions redirects to iTunes Store. Both are [official](https://developer.apple.com/videos/play/wwdc2018/705/?time=1501) [ways](https://web.archive.org/web/20190606015547/https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW19). Tested on my iOS 10-13 devices. – denkeni Jan 21 '20 at 01:16
  • Would like to point out that this doesn't take you to the App Store application, it opens up iTunes. This link, https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions, used to work and would take you to the App Store, not iTunes. But that link no longer works. – James Parker May 14 '20 at 11:44
  • This links to iTunes. The title of this question clearly states it would like to take the user to the App Store. Using this link itms-apps://apps.apple.com/account/subscriptions will open the App Store app on your phone or computer if you are on a Mac. – James Parker May 14 '20 at 11:57
  • Can i linked to specific package in this page? – tokenaizer Jun 02 '20 at 12:34
  • Its not redirecting to manage subscription for tvOS? Any help would be appreciated. – Waqas Jun 10 '21 at 11:10
  • 1
    As of iOS 15 this should be the correct answer: https://stackoverflow.com/a/71836610/4884617 – Shaked Sayag Nov 03 '22 at 11:56
  • How can I only show/direct user to my app in the the https://apps.apple.com/account/subscriptions ? – Hussein Mar 17 '23 at 18:48
37

Following this iTunes Connect guide, this URL works:

https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions

You can link directly to the Manage Subscriptions page in the App Store without having to write your own manage subscriptions page. To do so, link to this URL: https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions

However this will redirect to Safari before redirecting to App Store App. So the user will see app switching twice in their device. Changing https to itms or itms-apps does not seem to just work.

Btw, this only works on the device. It wouldn't work on the simulator.

Community
  • 1
  • 1
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156
  • This link also takes the user to iTunes and not the App Store as the question title states. – James Parker May 14 '20 at 11:55
  • This link was working on a device but recently it stops working on the device. It returns this: pings metrics dialogIdMZFinance.ManageSubscriptionsLoginRequired messageSign in to manage subscri messageCode5074 options Manage Subscriptions Cancel actionUrlbuy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions eventTypedialog failureType5074 customerMessageSign in to manage subscriptions. m-allowed dialog kindauthorization m-allowed messageSign in to manage subscriptions. explanationEnter your Apple ID and password and click Manage Subscriptions. defaultButtonok okButtonS... – mehdi Apr 01 '23 at 18:24
33

As of Nov 2018, this is the best approach.

if let url = URL(string: "itms-apps://apps.apple.com/account/subscriptions") {
    if UIApplication.shared.canOpenURL(url) {
        UIApplication.shared.open(url, options: [:])
    }
}
Roboris
  • 344
  • 3
  • 16
  • 1
    This is the correct way to direct the users to the AppStore -> Subscriptions. The previous pref "itms://" was redirecting to iTunes Store -> Subscriptions. – Starsky Apr 24 '20 at 09:49
31

2018 on IOS its a combination of the answers above. This URL will open the App Store App with the correct view: itms-apps://apps.apple.com/account/subscriptions

mklb
  • 1,215
  • 12
  • 8
  • As of Nov 2018, this is the best approach. – Roboris Nov 13 '18 at 07:22
  • 1
    This should be the top voted answer. It is the the only one that takes you to the App Store. All the other solutions either no longer work or take you to iTunes. This will work as a browser link as well. – James Parker May 14 '20 at 11:51
19

The above answers are possibly slightly out of date (including Apple's documentation grrr) as I am receiving a Safari error when trying to use the link:

// old way
https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions

Using XCode 5.1 and iOS 7.x, I am able to correctly link to the "Manage Subscriptions" section for the app in question using the following openURL: call:

// new way
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions"]]
manderson
  • 666
  • 6
  • 15
10

use this link to skip past safari and right to the screen in the appstore:

itmss://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions

have fun

khr055
  • 28,690
  • 16
  • 36
  • 48
graham
  • 117
  • 1
  • 2
  • 4
    where did you find this "itmss:" from? Just trial and error or is there an actual documentation for this? – Enrico Susatyo Aug 09 '13 at 00:22
  • Well, for what it's worth, I tried this today, it took me to the iTunes Store (not App Store), asked me for my password and worked. But When I went back to the app and execute it again, it's just giving me iTunes Store's home screen. I'll stick with https for now until Apple fix this. – Enrico Susatyo Sep 14 '13 at 06:37
  • This links to iTunes. The title of this question clearly states it would like to take the user to the App Store. – James Parker May 14 '20 at 11:54
3

In iOS15+, the showManageSubscriptions(in:) function presents the App Store sheet for managing subscriptions.

enter image description here

Kazunori Takaishi
  • 2,268
  • 1
  • 15
  • 27
1

Here is my small Swift 5 contribution:

guard let url = URL(string: "https://apps.apple.com/account/subscriptions") else { return }
UIApplication.shared.open(url, options: [:])

I hope it helps someone =)

Thanks to this answer: Opening Apple's subscription window from within app

Linus
  • 423
  • 5
  • 12
0

It seems like the new URL used by Apple in its support pages is https://finance-app.itunes.apple.com/account/subscriptions. This will open the iTunes Store app on any iOS device.

buzzb0x
  • 629
  • 1
  • 7
  • 10
-1

My app has recently been rejected for providing an external subscription management option in my app. The message I got from Apple Dev Team was: "We still found that while you have submitted In App Purchase products for your app, the In App Purchase functionality is not present in your binary. Specifically, the 'Manage Subscriptions' option links out of the app to iTunes Store."

I provided an view so the user can "Restore/Subscribe" to a yearly auto-renewable subscription (of course I have added the underlying logic to detect when the user is subscribed / not subscribed, and a "Manage my subscriptions" button that allows the user to manage his subscription via itunes (which is something I got out from various sources including this post).

I think this should be avoided in order to have the IAP product accepted. Perhaps you faced the same issue when submitting the app to review.

Drew
  • 24,851
  • 10
  • 43
  • 78
user740413
  • 41
  • 1
  • 7