Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel subscription on iOS and Android #679

Closed
iutin opened this issue Aug 31, 2019 · 6 comments
Closed

Cancel subscription on iOS and Android #679

iutin opened this issue Aug 31, 2019 · 6 comments
Labels
🤖 android Related to android 📱 iOS Related to iOS ❓ question Further information is requested

Comments

@iutin
Copy link

iutin commented Aug 31, 2019

How to implement cancel subscription on iOS and Android? Does it possible make by this library? Thank you

@hyochan
Copy link
Member

hyochan commented Aug 31, 2019

User can do this in their setting on each os. I'm not sure yet if you can achieve this in your app. Hope you can give me an update.

@hyochan hyochan added 🤖 android Related to android 📱 iOS Related to iOS ❓ question Further information is requested labels Aug 31, 2019
@jvandenaardweg
Copy link
Contributor

jvandenaardweg commented Sep 2, 2019

I'm not sure yet if you can achieve this in your app. Hope you can give me an update.

For both iOS and Android you cannot cancel subscriptions inside the app. You need to direct your users to iTunes/the App Store or Google Play.

You can do this on iOS:

Linking.openURL('https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions')

You can do this on Android (change YOUR_PACKAGE_NAME and YOUR_PRODUCT_ID:

Linking.openURL('https://play.google.com/store/account/subscriptions?package=YOUR_PACKAGE_NAME&sku=YOUR_PRODUCT_ID

https://facebook.github.io/react-native/docs/linking

@jvandenaardweg
Copy link
Contributor

jvandenaardweg commented Sep 2, 2019

Might be good to add this to the readme. As this is typically something you want to know when you start developing on in app purchases. I've updated my answer a little bit, as the way to present this to your users is exactly the same on iOS ánd Android.

@julioxavierr
Copy link
Contributor

I don't know if this is something that changed recently, but I've just tested and this redirects to install iTunes app. After some research I got to this new solution:

Linking.openURL('https://apps.apple.com/account/subscriptions');

@lukewlms
Copy link

If you're landing on this page and want the current solution, here's the readme section:

https://github.com/dooboolab/react-native-iap#how-can-a-user-cancel-a-subscription-in-my-app

@jaaywags
Copy link

jaaywags commented Aug 19, 2021

@lukewlms I think that link is dead. I did find this though..

I also used this in my app

if (Platform.OS === 'ios') {
  Linking.openURL('https://apps.apple.com/account/subscriptions');
} else {
  Linking.openURL('https://play.google.com/store/account/subscriptions');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Related to android 📱 iOS Related to iOS ❓ question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants