[Android] prorationModeAndroid not working for subscription upgrade/downgrade - not applied immediately
Description:
I'm trying to implement subscription upgrade/downgrade with proration using react-native-iap. Subscriptions are upgrading/downgrading, but the change is not applied immediately, despite using ProrationModesAndroid.IMMEDIATE_WITH_TIME_PRORATION.
Expected Behavior: The subscription should switch immediately to the new plan, and the billing should adjust based on the remaining time/value of the current subscription (as per the selected proration mode).
Current Behavior:
The new subscription is not applied immediately — instead, it seems to be scheduled for the next billing cycle, as if DEFERRED proration mode is used.
Code Snippet:
try {
let requestParams: RequestSubscription = {
sku: productId,
};
if (Platform.OS === 'android') {
if (offerToken) {
requestParams.subscriptionOffers = [{ sku: productId, offerToken }];
}
requestParams.prorationModeAndroid = ProrationModesAndroid.IMMEDIATE_WITH_TIME_PRORATION;
}
await requestSubscription(requestParams);
} catch (errorResponse) {
console.warn('Subscription error:', errorResponse);
}
Setup Details:
- react-native-iap: 12.0.0
- Google Play Billing Library: 6.0.1
- react-native: 0.65.3
- Platform: Android
- Test Account: Yes, I'm using a licensed test user with an active subscription.
Additional Info:
- Both products are in the same subscription group.
- The
offerTokenis fetched dynamically usinggetSubscriptions(). - The Play Console setup includes base plans and offers for each subscription.
- The
requestSubscription()call succeeds with no error, and subscription does update — just not immediately.
Repro Steps:
- Purchase Subscription A
- Call
requestSubscription()for Subscription B withIMMEDIATE_WITH_TIME_PRORATION - Observe that subscription doesn't switch immediately
Questions / Clarifications:
- Does
[email protected]fully supportprorationModeAndroidfor Google Billing v6.0.1? - Is there a specific requirement or flag in the subscription offers/base plans that affects immediate proration?
- Are there any known issues around this behavior?
I encountered the same issue after upgrading the package. Have you resolved this issue?
ProrationMode has migrated to ReplacementMode (12.15.2
You need to change the prorationMode to replacementMode
requestSubscription.replacementModeAndroid = ReplacementModesAndroid.WITH_TIME_PRORATION;
Issue with RNIap.ReplacementModesAndroid.DEFERRED in Version 12.16.2
I’ve noticed that in RNIap version 12.16.2, the ReplacementModesAndroid.DEFERRED mode is not working as expected. When attempting to switch plans, it immediately cancels the existing subscription and activates the new plan right away.
However, in version 12.10.7 , the same mode worked correctly — the new plan would only activate after the current plan’s billing period ended, which is the intended behavior for the deferred replacement mode.