Rajat Chauhan
Rajat Chauhan

Reputation: 61

Requested replacement mode is not supported for this request : Google Play billing

Need help, I am getting this error when I have already purchased one subscription plan and purchasing same plan again before expiry of previous one. Using google play billing with deferred proration mode for this.enter image description here

Developer error Description - "Requested replacement mode is not supported for this request"

used standard code for this.

String offerToken = productDetails .getSubscriptionOfferDetails(selectedOfferIndex) .getOfferToken();

BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder() .setProductDetailsParamsList( ImmuableList.of( ProductDetailsParams.newBuilder() // fetched via queryProductDetailsAsync .setProductDetails(productDetails) // offerToken can be found in // ProductDetails=>SubscriptionOfferDetails .setOfferToken(offerToken) .build())) .setSubscriptionUpdateParams( SubscriptionUpdateParams.newBuilder() // purchaseToken can be found in Purchase#getPurchaseToken .setOldSkuPurchaseToken("old_purchase_token") .setReplaceSkusProrationMode(ProrationMode.DEFERRED) .build()) .build();

BillingResult billingResult = billingClient.launchBillingFlow(activity, billingFlowParams);

Moreover it works fine when I use proration mode like IMMEDIATE_AND_CHARGE_FULL_PRICE and IMMEDIATE_WITHOUT_PRORATION but not with DEFERRED.

Upvotes: 1

Views: 816

Answers (1)

thegirlincode
thegirlincode

Reputation: 404

Did you try this one?

setSubscriptionReplacementMode(BillingFlowParams.SubscriptionUpdateParams.ReplacementMode.CHARGE_FULL_PRICE)

Upvotes: 1

Related Questions