Search Unity

Google Play Subscription Upgrade / Downgrade

Discussion in 'Unity IAP' started by eylulatilgan, Apr 25, 2018.

  1. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @JeffDUnity3D Maybe I missed it in this thread, how it seems it was never answered how to react to upgrades/downgrades after calling UpdateSubscription?
    For iOS, it seems we need to directly call RestorePurchase after the UpdateSubscription call, is this correct?
    How is this done for Android?

    Also, what is the "developerPayload" string we need to pass for the iOS version of the method?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Where are you seeing a reference to developerPayload? I would expect a ProcessPurchase to be fired, I haven't tested directly. What are you seeing? Calling RestoreTransactions should work but doesn't seem optimal.
     
  3. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @JeffDUnity3D I mean the "sampleDeveloperPayload" from this method:
    SubscriptionManager.UpdateSubscription(newProduct, oldProduct, "sampleDeveloperPayload", appleStoreCallback, googlePlayCallback);


    Ah, so when UpdateSubscription is called, Unity automatically fires the ProcessPurchase method (similar to when we call InitiatePurchase)?

    Is there any indication in the PurchaseEventArgs that a subscription was upgraded/downgraded, or do we need to keep track of that?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You should be able to track the receipts in the product controller.
     
  5. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @JeffDUnity3D Can you also please check about the "sampleDeveloperPayload" in my last message?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, where are you reading in the documentation that is is a required parameter? Are you getting an error in your testing? Generally the payload is an optional parameter
     
  7. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @JeffDUnity3D Could you please link the documentation about this? I'm only going with the details from this thread.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  9. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Previously we were using the Google Play Billing plugin in order to specify proration mode, but one of the latest UnityIAP updates adds this functionality and due to a build issue where the libraries conflicted from the plugin and UnityIAP, we are now dropping the billing plugin.

    Does anyone here know what exactly needs to be passed into the new IGooglePlayStoreExtensions.UpgradeDowngradeSubscription(string oldSku, string newSku, int desiredProrationMode)?

    Passing in the product IDs into oldSku and newSku returns a ProductUnavailable error when attempting to change subscriptions.

    The Google Play Billing plugin only used Product data types in their Google.Play.Billing.IGooglePlayStoreExtensions.UpgradeDowngradeSubscription(Product oldProduct, Product newProduct, GooglePlayStoreProrationMode prorationMode) method.

    On another note: Does the updated version of UnityIAP support deferred proration mode? There was initially an issue with Google's plugin where the app/game would hang indefinitely because Unity was expecting a response with the subscription purchase details, which would never be received because the purchase was deferred.

    I reported that bug here, and Google removed the option to set the deferred proration mode from their plugin after that point.
     
    Last edited: Nov 19, 2020
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would not want to separately install the Google plugin with Unity IAP. As you point out, we now include the v3 Google library with IAP. If the Google library dropped proration mode, then of course we not be able to support it as we are a pass-through service for the store APIs. I will check on the current status of subscription upgrades and downgrades.
     
  11. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    It's not that the Deferred proration mode is no longer supported by Google, it's just that the implementation of UnityIAP expects a response with purchase information, which is not possible if the purchase is technically deferred to the next subscription renewal time. A deeper explanation is provided here by someone from Google.

    Thank you, looking forward to it. Our update to UnityIAP 2.2.1 has been relatively seamless, besides changing subscriptions now being broken on Google Play.
     
  12. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Hi @JeffDUnity3D, just wondering whether you have found out what needs to be passed as parameters into IGooglePlayStoreExtensions.UpgradeDowngradeSubscription(string oldSku, string newSku, int desiredProrationMode)? Thanks again.
     
  13. John_Corbett

    John_Corbett

    Joined:
    May 17, 2019
    Posts:
    151
    Harrishun likes this.
  14. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Hi John, thanks for getting back to me. That's what I assumed initially, but it seemed like using the product IDs was returning an error for me. I'll give this another test and confirm whether this is the case or whether there was something else on my end happening. Thanks again!
     
  15. s-tang

    s-tang

    Joined:
    Jan 8, 2020
    Posts:
    10
    Hi, I'm having a problem with upgrading and downgrading for subscription for Google Play.
    Though I have another problem with the subscription here, I thought I should post the new problem here, since its related to upgrading and downgrading of subscription.

    I'm using version 2.2.1 for the core (the one from Package Manager), and version 2.2.4 for the package (the one from Services). Using them on Unity 2019.2.21f1.



    The problem I'm getting is that, both old and new subscription no longer has receipt, after the upgrading/downgrade is reflected via Google Play app. The app was restarted a couple of times as well, to see if there's any changes.

    The following log is roughly 10mins after the upgrade/downgrade has been applied officially.
    I was trying to downgrade from plan3 to plan1.
    2020-12-16 16:16:44.354 28672-28711/com.(omitted) I/Unity: ZR HandleSubscriptions (omitted).ads.plan1

    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR GetSubscriptionInfo ((omitted).ads.plan1)
    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR product type (Subscription)
    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR has receipt (False)

    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR GetSubscriptionInfo ((omitted).ads.plan3)
    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR product type (Subscription)
    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR has receipt (False)

    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR GetSubscriptionInfo ((omitted).ads.plan6)
    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR product type (Subscription)
    2020-12-16 16:16:44.355 28672-28711/com.(omitted) I/Unity: ZR has receipt (False)
    2020-12-16 16:16:44.356 28672-28711/com.(omitted) I/Unity: ZR active subscription? ()

    I tried to restart the app with the same build again after another 10mins.
    It seems that IStoreListener.ProcessPurchase is called after initialization.
    And plan1 is finally active in the app.

    2020-12-16 16:27:22.120 29263-29315/com.(omitted) I/Unity: ZR: ProcessPurchase (omitted).ads.plan1

    2020-12-16 16:27:22.173 29263-29315/com.(omitted) I/Unity: ZR GetSubscriptionInfo ((omitted).ads.plan1)
    2020-12-16 16:27:22.173 29263-29315/com.(omitted) I/Unity: ZR product type (Subscription)
    2020-12-16 16:27:22.173 29263-29315/com.(omitted) I/Unity: ZR has receipt (True)

    2020-12-16 16:27:22.183 29263-29315/com.(omitted) I/Unity: ZR GetSubscriptionInfo ((omitted).ads.plan3)
    2020-12-16 16:27:22.183 29263-29315/com.(omitted) I/Unity: ZR product type (Subscription)
    2020-12-16 16:27:22.183 29263-29315/com.(omitted) I/Unity: ZR has receipt (False)

    2020-12-16 16:27:22.183 29263-29315/com.(omitted) I/Unity: ZR GetSubscriptionInfo ((omitted).ads.plan6)
    2020-12-16 16:27:22.183 29263-29315/com.(omitted) I/Unity: ZR product type (Subscription)
    2020-12-16 16:27:22.183 29263-29315/com.(omitted) I/Unity: ZR has receipt (False)

    I don't think having a gap of 10 to 20 mins of inactive of the subscription is acceptable, between the upgrade/downgrade process. I wonder if the issue lies on Google Play or something else.

    Here's my code for subscription for upgrading/downgrade for Google Play
    Code (CSharp):
    1.  
    2.         private void HandleSubscriptions(Product product)
    3.         {
    4.             Debug.Logger.Write($"ZR HandleSubscriptions {product?.definition.id}");
    5.             var productId = product.definition.id;
    6.             var billingProductParam = _billingProductDatas.GetItemByProductID(productId)?.Params;
    7.  
    8.             if(billingProductParam == null)
    9.             {
    10.                 Debug.Logger.Write("Product ({0}) not found in Billing Product data", productId);
    11.                 _isPurchasing = false;
    12.                 OnPurchaseFinishedEvent?.Invoke(productId, InAppPurchaseManager.PurchaseResult.Failed, "ZR: sub failed!");
    13.                 return;
    14.             }
    15.  
    16.             var subscriptionGroupType = billingProductParam.SubscriptionGroupTypeEnum;
    17.             var subscriptionDataGroup = _billingProductDatas.GetItems(subscriptionGroupType);
    18.             var subscriptionInfos = subscriptionDataGroup
    19.                 .Select(item => GetSubscriptionInfo(item.Params.GetProductID()))
    20.                 .Where(info => info !=null)
    21.                 .ToArray();
    22.  
    23.             // check if its a new purchase or a downgrade/upgrade
    24.             var activeSubscriptionInfo = subscriptionInfos.FirstOrDefault(
    25.                                         info => info.isSubscribed() == Result.True);
    26.  
    27.             Debug.Logger.Write($"ZR active subscription? ({activeSubscriptionInfo?.getProductId()})");
    28.             if (activeSubscriptionInfo == null)
    29.             {
    30.                 _storeController.InitiatePurchase(product);
    31.                 return;
    32.             }
    33.  
    34.             var oldProductId = activeSubscriptionInfo.getProductId();
    35.             if (oldProductId == productId)
    36.             {
    37.                 Debug.Logger.Write("Product ({0}) already bought and is active", productId);
    38.                 _isPurchasing = false;
    39.                 OnPurchaseFinishedEvent?.Invoke(productId, InAppPurchaseManager.PurchaseResult.Cancelled, "This product is subscribed");
    40.                 return;
    41.             }
    42.  
    43.             var oldProduct = _storeController.products.WithID(oldProductId);
    44.             var newProduct = _storeController.products.WithID(productId);
    45.  
    46.             HandleSubscriptionUpgrade(oldProduct, newProduct);
    47.         }
    Code (CSharp):
    1.  
    2.         protected override void HandleSubscriptionUpgrade(Product oldProduct, Product newProduct)
    3.         {
    4.             SubscriptionManager.UpdateSubscriptionInGooglePlayStore(oldProduct, newProduct,
    5.                 (productInfos, newProductId) =>
    6.                 {
    7.                     // _googleStoreExtensions.UpgradeDowngradeSubscription definition
    8.                     // https://forum.unity.com/threads/google-play-subscription-upgrade-downgrade.528434/page-3#post-6560932
    9.                     _googleStoreExtensions.UpgradeDowngradeSubscription(oldProduct.definition.id,
    10.                                                                         newProduct.definition.id,
    11.                                                                         (int) ProrationMode.DEFERRED);
    12.                 });
    13.         }

    By the way, is there really a need to call SubscriptionManager.UpdateSubscriptionInGooglePlayStore?
    As _googleStoreExtensions.UpgradeDowngradeSubscription doesn't to be accepting the string from productInfos param, I ended up just provide the product ids to the _googleStoreExtensions.UpgradeDowngradeSubscription.
     
  16. s-tang

    s-tang

    Joined:
    Jan 8, 2020
    Posts:
    10
    Just tried calling _googleStoreExtensions.RestoreTransactions, when both subscriptions are missing their receipt.
    It returned true immediately, which I assume its a success.

    But the receipts are still missing.

    Code (CSharp):
    1. protected override void StoreRestorePurchases(Action<bool> onTransactionsRestored)
    2.         {
    3.             _googleStoreExtensions.RestoreTransactions(onTransactionsRestored);
    4.         }


    I think I found out the actual update timing of the receipts.

    Here's a timeline for my steps:
    0 min: subscribe to Plan3 (duration = 10min)
    1 min: request downgrade to Plan1 (still under Plan3 subscription)
    10 min: Google Play verified that Plan1 is active (but no receipt for Plan1 in app) (duration = 5min)
    15 min: Google Play verified that Plan1 has been auto-renewed (Plan1 has receipt in app now)
    20 min: Google Play verified that Plan1 has been auto-renewed again (Plan1 still has receipt in app)
    21 min: Cancel Plan1 subscription via Google Play (SubscriptionInfomation show that isCancelled is true, but getCancelledDate is default value)
    25 min: Google Play verified that Plan1 has been cancelled (Plan1 no longer has receipt)
    I hope these information helps.
     
    Last edited: Dec 16, 2020
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @s-tang We will look into this.
     
  18. s-tang

    s-tang

    Joined:
    Jan 8, 2020
    Posts:
    10
    Thanks!

    Updating the package to version 2.2.5 seems to have fixed it though.
     
  19. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you are unblocked now? So we don't need to test. You shouldn't need to call RestoreTransactions on Google, it's done automatically for you.
     
  20. s-tang

    s-tang

    Joined:
    Jan 8, 2020
    Posts:
    10
    Yup, at least for Google side.

    Awesome! That's good to know! Thanks!
     
  21. xLeo

    xLeo

    Joined:
    Sep 21, 2010
    Posts:
    194
    I read that comment and had to ask: do we really need to have a "Restore Transactions" button on Google Play or can we just hide it?

    The method is available on the API, but I'm not really sure if we need it.
     
  22. Harrishun

    Harrishun

    Joined:
    Apr 13, 2016
    Posts:
    59
    Unless something has changed, Google does not require a Restore Transactions button, only Apple.
     
    xLeo likes this.
  23. xLeo

    xLeo

    Joined:
    Sep 21, 2010
    Posts:
    194
    Yes, I know that.

    I was wondering what's the reason that we now have a "Restore Transaction" API for Google Play as well.
     
  24. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Because developers asked for it. It is optional.
     
    xLeo likes this.
  25. skrpeta

    skrpeta

    Joined:
    Nov 9, 2016
    Posts:
    18
    Hi guys, me again :D I updated my IAP plugin from 2.0 to 2.2.6 and for some reason upgrading/downgrading iaps doesnt work anymore. Purchasing still works, but if i want tu update sub to new tier it fails. So this is error log:
    I bolded what I think is the problem. In one part product id is subscription1Month which should be com.ziaproduction.pricalica.subscription.1monthnew2 . I think this is wrong, its like the method doest pass good id, just the name of the variable, not the value.

    This is my code:

    Code (CSharp):
    1.  
    2. oldProduct = m_StoreController.products.WithID(kProductIDSubscription0);
    3. newProduct = m_StoreController.products.WithID(kProductIDSubscription3);
    4. googlePlayCallback = new Action<string, string>(m_GooglePlayStoreExtensions.UpgradeDowngradeSubscription);
    5. SubscriptionManager.UpdateSubscriptionInGooglePlayStore(oldProduct, newProduct, googlePlayCallback);
    @JeffDUnity3D any help would be great. Did something changed in that method?
     
    Last edited: Jan 24, 2021
  26. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Use Debug.Log to output the values that you expect. I'm not seeing subscription1Month in your code that you shared.
     
  27. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  28. skrpeta

    skrpeta

    Joined:
    Nov 9, 2016
    Posts:
    18
    Its just variable name that is for both google and apple IAP Id.
    I changed little bit code but still same results. kProductNameGooglePlaySubscription0 and kProductNameGooglePlaySubscription1 are just variable names that contain specific store id from google and are declared before in code.
    Code (CSharp):
    1.                  
    2. oldProduct = m_StoreController.products.WithStoreSpecificID(kProductNameGooglePlaySubscription0);
    3. newProduct = m_StoreController.products.WithStoreSpecificID(kProductNameGooglePlaySubscription1);
    4. Debug.Log("oldProduct specific id" + oldProduct.definition.storeSpecificId);
    5. Debug.Log("newProduct specific id" + newProduct.definition.storeSpecificId);
    6. googlePlayCallback = new Action<string, string>(m_GooglePlayStoreExtensions.UpgradeDowngradeSubscription);
    7.                     SubscriptionManager.UpdateSubscriptionInGooglePlayStore(oldProduct, newProduct, googlePlayCallback);
    8.  
    Same result.

    As you see Im getting correct oldProduct and newProduct. Thode specic ids came from storeController. But when I call SubscriptionManager.UpdateSubscriptionInGooglePlayStore for that new product I get ProductUnavailable

    I must emphasize that I can buy BOTH those products directly, but when i want to downgrade or upgrade subscription then it fails. Like I said before also, this code worked for 1.5 years. Is there something that I must change i google console on the web? After all they changed their billing system.
    Thank you :)
     
  29. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I admit that I haven't tested this in awhile, but doesn't the newproduct come first? https://forum.unity.com/threads/upgrade-subscriptions.892000/#post-5861968
     
  30. skrpeta

    skrpeta

    Joined:
    Nov 9, 2016
    Posts:
    18
    This is from class SubscriptionManager:
    Code (CSharp):
    1. public class SubscriptionManager
    2.     {
    3.         public SubscriptionManager(Product product, string intro_json);
    4.         public SubscriptionManager(string receipt, string id, string intro_json);
    5.  
    6.         public static void UpdateSubscription(Product newProduct, Product oldProduct, string developerPayload, Action<Product, string> appleStore, Action<string, string> googleStore);
    7.         public static void UpdateSubscriptionInAppleStore(Product newProduct, string developerPayload, Action<Product, string> appleStoreUpdateCallback);
    8.         public static void UpdateSubscriptionInGooglePlayStore(Product oldProduct, Product newProduct, Action<string, string> googlePlayUpdateCallback);
    9.         public SubscriptionInfo getSubscriptionInfo();
    10.     }
    UpdateSubscription is first newProduct then old. For UpdateSubscriptionInGooglePlayStore first old then new.
     
  31. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Hmm..I might suggest trying the other way around, regardless of the docs.
     
    nicholasr likes this.
  32. skrpeta

    skrpeta

    Joined:
    Nov 9, 2016
    Posts:
    18
    Found solution. This is the code that works for me and is from @s-tang (Thank you):

    Code (CSharp):
    1.  
    2. SubscriptionManager.UpdateSubscriptionInGooglePlayStore(oldProduct, newProduct,
    3.                 (productInfos, newProductId) =>
    4.                 {
    5.                     m_GooglePlayStoreExtensions.UpgradeDowngradeSubscription(oldProduct.definition.id,
    6.                                                                         newProduct.definition.id);
    7.                 });
    I guess that UpgradeDowngradeSubscription extension needs also oldProduct and newProduct. Like always thank you @JeffDUnity3D for your time and help:)
     
    Last edited: Jan 26, 2021
    nicholasr and JeffDUnity3D like this.
  33. mkislenko

    mkislenko

    Joined:
    Jan 26, 2018
    Posts:
    9
    Hi @JeffDUnity3D, I'm facing two issues with implementing subscriptions in my Android application, maybe you could help. I have 3 types of subscription Weekly, Monthly and Annual, so users can choose appropriate for them, and change it if they need to.
    1) So the first problem is when I update subscription from one type to another, the old one still has receipt and subscription info. So my app thinking that this type of subscription is still turned on, until player relaunch the game. Is there any ability to update receipt for a product?
    2) And second problem is mostly about the testing subscription. I'm trying to check if user canceled subscription, and it expired while player was in game. Does receipt or subscription info will update in this case? It's hard to check it by myself, cause test subscription is last for 5 minute, but expireDate in subscriptionInfo is showing date a week/moth/year/ later. Is that supposed to be so? I tried implementing subscriptions before on IOS app and it returned me correct testing expire date in 5 minutes. Maybe its just Android problem.

    I'm using:
    1. Unity version 2019.4.8f1
    2. Unity IAP Store package 2.0.0
    3. Unity IAP Package version 2.0.6
     
    Last edited: Jan 29, 2021
  34. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please update to IAP 2.2.7 (available soon) and In App Purchasing library 2.2.2, we have addressed this.
     
  35. mkislenko

    mkislenko

    Joined:
    Jan 26, 2018
    Posts:
    9
    Ok. Thank you for reply, will be waiting for it.
     
  36. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    2.5 years passed since last message here, but seems Subscription upgrade/downgrade still doesn't work.
    I got 2 subscriptions: Monthly with 7 days trial and Yearly with 7 days trial.

    I tried different approaches:
    1. how @skrpeta mentioned
    Code (CSharp):
    1. SubscriptionManager.UpdateSubscriptionInGooglePlayStore(oldProduct, newProduct,
    2.                 (productInfos, newProductId) =>
    3.                 {
    4.                     m_GooglePlayStoreExtensions.UpgradeDowngradeSubscription(oldProduct.definition.id,
    5.                                                                         newProduct.definition.id);
    6.                 });
    looks like the most proper way, however I receive the error trying to upgrade from Monthly to Yearly:

    Code (CSharp):
    1. UpgradeCallback. arg1: {"productId":"sk_499_1m_1w0","is_free_trial":"False","is_introductory_price_period":false,"remaining_time_in_seconds":2677003.306467}, arg2: sk_2999_1y_1w0
    2. onPurchaseFailedEvent(productId:sk_2999_1y_1w0 message:Please verify that the products are subscriptions and are not null.)
    3. Couldn't purchase product: 'sk_2999_1y_1w0', PurchaseFailureReason: ProductUnavailable
    The subscription sk_2999_1y_1w0 is active and can be purchased if I buy it initially.
    Same error if I try to downgrade from Yearly to Monthly.
    2. process purchase of the subscription just after ChangeSubscription callback is received (btw it is received immediately, without any delay. Not sure it should be like that without some store API calls), but as a result I just get 2 purchased subscriptions, similar what @mkislenko described.

    I tried 2nd approach before realized there is a method in Google Play Store Extensions, and not likely that's a proper way, while 1st approach has to work but it doesn't.

    I am on IAP 4.8.0, Unity 2021.3.25
    I followed the IAP samples btw.

    @JeffDUnity3D how to solve this problem? Can it be tested in internal test using test purchases at all?
     
    Last edited: May 18, 2023
  37. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    :<After another day working on that task I still didn't figure out how to make it work!

    From the beginning - according to Android Billing Library 5.x documentation subscription change is allowed ONLY between different base plans (tiers) within a single subscription.

    New structure looks like that:
    1. Subscription (<product_id>)
    1.1. Base plan Tier 1 (<plan-id>)
    1.2. Base plan Tier 2 (<plan-id>)

    Before my subscriptions were set using legacy approach - 2 separete subscriptions with 1 default base plan. According to the new structure it should be:
    1. Full access subscription (all_access)
    1.1. Monthly with 7 days free trial (monthly-7days-trial)
    1.2. Yeatly with 7 days free trial (yearly-7days-trial)

    According to documention the SKU should be formed as <all_access:monthly-7days-trial> but Unity doesn't recognize it. I Unity can initialize product only by a <all_access> product id and I can see only Backwards compatible base plan there.

    Now the most interesting part!
    Unity IAP 4.8.0 documentation says
    however it doesn't support any method new library has. This means there is no way to:
    1. get the base plans
    2. swich between them
    Taking everything above in account I just can't understand how did UpdateSubscriptionInGooglePlayStore had to work at all?
    Yes, you can get 2 different subscriptions groups by subscription id but you can't switch between them.
    If you try to switch between to subscriptions (not their tiers) you will receive this error:

    Code (CSharp):
    1. 2023/05/19 13:07:53.335 30157 30194 Warn Unity onPurchaseFailedEvent(productId:sk_2999_1y_1w0 message: {M: GPUL.HEC} - Google BillingResponseCode = ServiceUnavailable)
    2. 2023/05/19 13:07:53.335 30157 30194 Warn Unity UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    3. 2023/05/19 13:07:53.335 30157 30194 Warn Unity UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. 2023/05/19 13:07:53.335 30157 30194 Warn Unity UnityEngine.Logger:LogFormat(LogType, String, Object[])
    5. 2023/05/19 13:07:53.335 30157 30194 Warn Unity UnityEngine.Purchasing.PurchasingManager:OnPurchaseFailed(PurchaseFailureDescription)
    6. 2023/05/19 13:07:53.335 30157 30194 Warn Unity UnityEngine.Purchasing.<>c__DisplayClass10_0:<OnPurchaseFailed>b__0()
    7. 2023/05/19 13:07:53.335 30157 30194 Warn Unity UnityEngine.Purchasing.Extension.UnityUtil:Update()
    8. 2023/05/19 13:07:53.335 30157 30194 Warn Unity
    9.  
    1684491039968.jpg


    @Arnaud_Gorain could you please clarify this or you are in iOS IAP development team?
     
    Last edited: May 19, 2023
  38. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    Hi @novaVision,
    Let's just say the team org does not work like this, it's a bit more complex.

    We are going to validate some points related to your issue, and we'll keep you in touch.
    Stay tuned!
     
  39. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    @Arnaud_Gorain ok, will be awaiting.

    I just can't understand - why did Unity annouce new feature like Subscription change, implemented methods in IAP package and so on, but in the fact it just doesn't work? I spent 2+ days on this task and in the result realised they spent nowhere. Really disappointing.
    If I would check the documentation where can't be found any point that subscription change is implemented in Unity, I never would spend any time on that: no means no. Will find some other solution, not a problem... but what I see is just insane
     
  40. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    @Arnaud_Gorain how long should I stay tuned?
    Isn't 3 months enough?
     
  41. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    Hi @novaVision,
    Extended library features will take more times to be handled in the end. You might notice feedback on it in Q1-2 2024 but I doubt before that.

    Let me know if you have questions.