You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use this code for upgrade, downgrade for subscription
BillingFlowParamsbillingFlowParams = 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();
BillingResultbillingResult = billingClient.launchBillingFlow(activity, billingFlowParams);
How to upgrade, downgrade, or change their subscription
The text was updated successfully, but these errors were encountered: