Skip to main content
Answer

Subscription product change issue

  • April 18, 2025
  • 2 replies
  • 107 views

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

This post has been closed for comments

2 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 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
  • Author
  • Helper
  • Answer
  • April 26, 2025

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