chirag04 / react-native-in-app-utils

A react-native wrapper for handling in-app payments
MIT License
890 stars 185 forks source link

Upgrade subscription #169

Closed sonirad88 closed 6 years ago

sonirad88 commented 6 years ago

Hi. I'm using auto-renewing subscriptions in my application and i have two types: silver and premium. My question is can i make upgrade on the subscription through my application from silver (suppose that user already has purchased silver) to premium and how that flow goes. It would be nice if someone can point me the function that i can use or give me example of usage. Thanks

superandrew213 commented 6 years ago

Have a look at this: https://help.apple.com/itunes-connect/developer/#/dev7f2d6b652

You have to use subscription groups and levels. Then you can just subscribe the user to the new plan and the App Store will take care of cancelling the old subscription and adjusting the payments.

sonirad88 commented 6 years ago

Thank u superandrew So basically i will use this method InAppUtils.purchaseProduct(productIdentifier) where productIdentifier is the level that i want to upgrade.

superandrew213 commented 6 years ago

Yes, but make sure to group your silver and premium subscription on iTunesConnect.

Mubashirkhan commented 6 years ago

can we also downgrade our subscription plan. i have three subscription plans in the same group and the upgrade us working fine but when i try to move to a downgrade subscription plan i get an error response could not connect to itunes ????

Mubashirkhan commented 6 years ago

this is from the appstore documentation does that some how justifies the error and how this should be handled at the mobile end ????

Downgrade. When a customer switches from a subscription in a higher level to a subscription in a lower level. Customers will be billed the new rate on their next renewal date.