Cannot upgrade android in-app subscription. Error: "Something went wrong on our end. Please try again."
Asked Answered
D

3

9

Issue:

  • Cannot upgrade current subscription to different subscription.
  • Showing Error: "Something went wrong on our end. Please try again."

Description:

  • Were using play billing library v3.0.3 and we handled subscription upgrade as code below.
BillingFlowParams purchaseParams = BillingFlowParams.newBuilder()
                    .setSkuDetails(skuDetails)
                    .setOldSku(oldSKU, oldPurchaseToken)
                    .setReplaceSkusProrationMode(IMMEDIATE_WITH_TIME_PRORATION)
                    .build();
  • Things were as expected when we launched.
  • Some users reported that they cannot upgrade their subscription.
  • We tested upgrade and same error was encountered: "Something went wrong on our end. Please try again."
  • Then we upgraded to play billing library v4.0.0 thinking it would solve our issue.
BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder()
        .setSubscriptionUpdateParams(SubscriptionUpdateParams.newBuilder()
            .setOldSkuPurchaseToken(oldPurchaseToken)
            .setOldSkuPurchaseId(oldSKU) // This method is not available in lib[4.0.0] but mentioned in docs
            .setReplaceSkusProrationMode(IMMEDIATE_WITH_TIME_PRORATION))
        .setSkuDetails(skuDetails)
        .build();
  • Same error is reported again: "Something went wrong on our end. Please try again."
  • Also new play billing library v4.0.0 does not have method setOldSkuPurchaseId() in class SubscriptionUpdateParams.Builder but mentioned in developer docs

Error Screenshot Attached Below

screenshot

Dowsabel answered 25/5, 2021 at 14:13 Comment(2)
facing same issue on 3.0.3 , did upgrading to 4.0.0 solved this for you ?Krigsman
@SourinGhosh No, it did not.Dowsabel
E
0

Due to the new Reserve Bank of India eMandate notification some of your subscription experiences may change.

For More Details checkout this

Emie answered 14/7, 2021 at 9:15 Comment(0)
G
4

I had to add an additional .build() to Google's example code

        // Retrieve a value for "skuDetails" by calling querySkuDetailsAsync()
        val flowParams = BillingFlowParams.newBuilder()
                .setSubscriptionUpdateParams(SubscriptionUpdateParams.newBuilder()
                    .setOldSkuPurchaseToken(purchaseTokenOfOriginalSubscription)
                    .setReplaceSkusProrationMode(desiredProrationMode)
                    .build() // <-- MISSING BUILD
                    )
                .setSkuDetails(upgradeOrDowngradeSkuDetails)
                .build();
        val responseCode = billingClient.launchBillingFlow(activity, flowParams)
Guildsman answered 10/7, 2021 at 23:16 Comment(1)
Thanks. It works. I'm more surprised that Google didn't show this in any documentation ... how can they be so ridiculously careless.Kearns
R
0

I managed to get rid of the error "Something went wrong on our end. Please try again." I cleared the Play Market cache and rebooted the device.

Update: I found a solution. Just skip this parameter, don't specify it. It works well with subscriptions in my app.

.setOldSkuPurchaseId(previousSku)
Reflexion answered 29/5, 2021 at 8:6 Comment(3)
Have you verified that previous subscription is NOT active?Dowsabel
@TejPratap Yes. I checked my app in the subscriptions section of the Play Market.Reflexion
I don't even see setOldSkuPurchaseIdBanister
E
0

Due to the new Reserve Bank of India eMandate notification some of your subscription experiences may change.

For More Details checkout this

Emie answered 14/7, 2021 at 9:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.