Skip to main content
Solved

Upgrade/Downgrade Subscription in Android

  • November 1, 2024
  • 1 reply
  • 213 views

Forum|alt.badge.img

Hi folks,

I have few concerns regarding upgrade/downgrade subscription in android. Before coming onto the questions i want to tell the subscription scenario we are using in our app.
BasicPackage:

  • Monthly
  • Yearly

AdvanvePackage:

  • Monthly
  • Yearly

Questions:

  1. What upgrade/downgrade refers to means is it refer to duration i.e monthly, yearly etc or ammount of package?
  2. We have to handle all the posssible scenarios for upgrading and downgrading seperately based on current subscription and manually by passing oldProductID??
  3. The doc says we have to pass oldProductId what was it meant? basePlanId(yearly_advance_Package) or subscriptionId(advancePackage) for productIdentifier(advancePackage:yearly_advance_Package) while i think productIdentifier only use for revenue cat. 
  4. If IOS subscribed user login into to Android what should i do?? instead of allowing them to manage in our app isn’t it better to route it to managementUrl?? Because if he buys then there will be two subscription for same user and vice versa.

Thanks in advance!

 

Best answer by Greenie Cheng

Hi @muhammad-amaan-f71839 

To answer your questions:

  1. Whether a product change is an upgrade or a downgrade in Google Play Store is based on the unit price of the product. We can calculate this by finding the “day rate” for the product. For example, if you have a monthly product that costs $30, the unit price per day would be ~$1 ($30/30 days depending on the month). If you have a annual product that costs $100, the unit price per day would be ~$0.27 ($100/365 days). This means that even though the annual product costs more than the monthly product, it is in fact a downgrade when a user changes from monthly to annual. 
  2. Yes, you will need to pass along the oldProductID which is available from CustomerInfo. This is mandatory to indicate that it is a product change. While you can opt to handle the different scenarios of upgrade and downgrade if you want to use different replacement modes (previously known as proration modes), it’s not necessary - if no mode is provided, we would fallback to use the default mode of WITHOUT_PRORATION. 
  3. oldProductId refers to RevenueCat’s product identifier, so it would be `advancePackage:yearly_advance_Package`.
  4. To best handle cross platform access such as when a user has already subscribed on the App Store and have installed your app via Play Store, the user will need to have a app user id assigned. This typically requires that your user logs in on your app on the App Store where the purchase has occurred where they’re assigned a unique app user id. Using this same app user id on Play Store, you can check the entitlement status and provide access to your Play Store app even if they had signed up on the App Store. 

Hope this helps! 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

1 reply

Forum|alt.badge.img+3
  • RevenueCat Staff
  • 44 replies
  • Answer
  • November 4, 2024

Hi @muhammad-amaan-f71839 

To answer your questions:

  1. Whether a product change is an upgrade or a downgrade in Google Play Store is based on the unit price of the product. We can calculate this by finding the “day rate” for the product. For example, if you have a monthly product that costs $30, the unit price per day would be ~$1 ($30/30 days depending on the month). If you have a annual product that costs $100, the unit price per day would be ~$0.27 ($100/365 days). This means that even though the annual product costs more than the monthly product, it is in fact a downgrade when a user changes from monthly to annual. 
  2. Yes, you will need to pass along the oldProductID which is available from CustomerInfo. This is mandatory to indicate that it is a product change. While you can opt to handle the different scenarios of upgrade and downgrade if you want to use different replacement modes (previously known as proration modes), it’s not necessary - if no mode is provided, we would fallback to use the default mode of WITHOUT_PRORATION. 
  3. oldProductId refers to RevenueCat’s product identifier, so it would be `advancePackage:yearly_advance_Package`.
  4. To best handle cross platform access such as when a user has already subscribed on the App Store and have installed your app via Play Store, the user will need to have a app user id assigned. This typically requires that your user logs in on your app on the App Store where the purchase has occurred where they’re assigned a unique app user id. Using this same app user id on Play Store, you can check the entitlement status and provide access to your Play Store app even if they had signed up on the App Store. 

Hope this helps! 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings