Skip to main content
Solved

Subscription product change issue


Forum|alt.badge.img+1

Hi community,

I’m stuck with the subscription product change before expiration. How to implement it in my android app (preferably in java)? All other operations are well executed through the paywall, except the product change. Unfortunately, it charges the new chosen plan at full price (instead a calculated pro rata up to the expiration date) and does not cancel the prior one. 

I asked to chatGPT, but there were a lot of issues with their suggested codes. I gave up with AI after more than 6 hours trying their codes. Each of their corrections generate new issues.

Is there someone here who can help me?

Ben

Best answer by BenoitDuvivier

Hi Joan,

 

Thanks for your reply, yes you are right, but in the meantime, I found the solution, I added the following lines in my code:

GoogleReplacementMode replacementMode = GoogleReplacementMode        .CHARGE_PRORATED_PRICE;       PurchaseParams params = new PurchaseParams.Builder(activity, selectedPackage)            .oldProductId(currentProductId)            .googleReplacementMode(replacementMode)            .build();

Thanks again for your help,

Ben

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

2 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 404 replies
  • April 24, 2025

Hi ​@BenoitDuvivier,

Just to clarify, you are showing your paywall to subscribed users so they can update/downgrade/crossgrade their subscription to a different plan - which is not working as expected with Paywalls v2, is that correct?

Best,

 

 


Forum|alt.badge.img+1

Hi Joan,

 

Thanks for your reply, yes you are right, but in the meantime, I found the solution, I added the following lines in my code:

GoogleReplacementMode replacementMode = GoogleReplacementMode        .CHARGE_PRORATED_PRICE;       PurchaseParams params = new PurchaseParams.Builder(activity, selectedPackage)            .oldProductId(currentProductId)            .googleReplacementMode(replacementMode)            .build();

Thanks again for your help,

Ben


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