iaphub / react-native-iaphub

The easiest way to implement IAP (In-app purchase) in your React Native app.
https://www.iaphub.com/
MIT License
319 stars 21 forks source link

Subscription downgrade #76

Closed dancixx closed 3 years ago

dancixx commented 3 years ago

Hi guys!

I need some help in this case. If my customer has a plan, for example, $29.99 then after a few days he would downgrade it, then the plan will be replaced immediately and the price difference will be handled by Apple, or should I take care of it? What I can see in webhooks is that Apple handles it.

Thanks for the help.

iaphub commented 3 years ago

Hi @dancixx,

In case of a subscription downgrade, the subscription will be replaced on next renewal date. If it is a subscription upgrade, the subscription will be replaced immediately and the user receive from Apple a refund of the prorated amount of the previous subscription. (You don't have to do anything on your side). More infos here: https://www.iaphub.com/docs/getting-started/create-subscription-groups#subscription-downgrade

dancixx commented 3 years ago

Hi,

Your answer is interesting because I got a downgrade 2 days before and got the subscription_replace event. In the summary, I can see the downgraded plan and the prorated time from the prev plan. ("subscriptionProrationMode":"immediate_and_charge_prorated_price")

iaphub commented 3 years ago

The subscriptionProrationMode is for Android only, I thought you were talking about an iOS subscription. On android the subscription is replaced immediately by default but you can change it with the subscriptionProrationMode parameter.

dancixx commented 3 years ago

Yes you're right. I talked about iOS.

I can see this now. image

iaphub commented 3 years ago

If you see any subscription that has been upgraded instead of being downgraded, you probably did not configure your subscription group correctly on iTunes connect (wrong order). More infos here: https://www.iaphub.com/docs/getting-started/create-subscription-groups#configure-a-subscription-group-on-itunes

dancixx commented 3 years ago

Hm. Tier03 costs 35.99 and the Tier02 costs 23.99.

iaphub commented 3 years ago

Apple doesn't detect a subscription upgrade or downgrade depending on the price but by using the order of your products in your subscription group (on iTunes connect). You should have the most expensive on position 1 and the cheapest on position 2.

dancixx commented 3 years ago

Thanks for your help I will check your suggestions. One more question left. Which is the default prorated mode on Android in your service? I wasnt clear in the docs.

iaphub commented 3 years ago

immediate_with_time_proration: https://github.com/iaphub/react-native-iaphub#proration-mode-android-only