Question

Implementing Subscription Changes with Proration in Flutter using RevenueCat

  • 14 March 2024
  • 1 reply
  • 40 views

Badge +1

Hello RevenueCat Community,

I'm currently working on a Flutter app where I need to manage subscription changes, specifically upgrading or downgrading user subscriptions while handling proration. I'm using the RevenueCat Flutter SDK for this purpose.

In native Android, I'm aware that we can use methods like purchaseProduct with PurchaseParams to specify an old product ID and set a specific proration mode (e.g., IMMEDIATE_WITHOUT_PRORATION)

I'm trying to achieve something similar in Flutter. My main questions are:

  1. How can I specify an old product ID and a proration mode when initiating a subscription change in Flutter using RevenueCat?
  2. Is there a direct way in the RevenueCat Flutter SDK to manage these subscription changes while applying proration, similar to the native Android approach?

Any guidance or examples on how to properly implement these subscription changes with proration in a Flutter app using RevenueCat would be greatly appreciated.

Thank you!


This post has been closed for comments

1 reply

Userlevel 5
Badge +9

Hi @victor-manuel-lagunas-132a70,

In Flutter you can do this by passing in a GoogleProductChangeInfo to purchasePackage or purchaseStoreProduct. The GoogleProductChangeInfo is constructed by the old product ID and proration mode, similar to the native Android flow.