Search Unity

Google Play subscription changes (Account hold, restore)

Discussion in 'Unity IAP' started by seven_, Jul 15, 2020.

  1. seven_

    seven_

    Joined:
    Sep 30, 2014
    Posts:
    42
    Google recently announced that Account Hold and Restore become mandatory on 1 Nov 2020. As I do not know what UnityIAP does internally (depending on your internal implementation, changes might or might not be required), I just want to check if these soon mandatory features result in any changes (including semantic changes) in your Subscription Info class.
     
    lyha likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It should work. "During account hold, the subscription is not returned by BillingClient.queryPurchases()." so it appears we don't need to do anything. We would need to test and confirm however.
     
  3. unitylicense19

    unitylicense19

    Joined:
    Aug 29, 2018
    Posts:
    32
    Any Update on this? Do we need to handle anything?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please share the results of your testing. We have no updates at this end.
     
  5. unitylicense19

    unitylicense19

    Joined:
    Aug 29, 2018
    Posts:
    32
    "Account hold is a subscription state that begins when a user's form of payment fails and any associated grace period has ended without payment resolution. When a subscription enters into account hold, you should block access to your content or service. The account hold period lasts for up to 30 days"

    this is difficult to test right, since theres no cancellation option in test mode so wanted to confirm,
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If that is the case, and you are concerned, I would suggest that you try with an actual .99 cent product purchase. Be sure to capture the device logs for troubleshooting https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/
     
    Last edited: Sep 24, 2020
  7. sysper

    sysper

    Joined:
    Oct 11, 2014
    Posts:
    33
    Google guides users through appropriate messages when subscription status is Account Hold.

    Google document indicates that the subscription status appears below when it is in Account Hold (On Hold).
    - expiryTimeMillis: Past
    - paymentState: 0 (Payment Pending)
    - autoRenewing: True

    Because currently Unity IAP's SubscriptionInfo has no paymentState information, it is not known whether the subscription status is Account Hold.

    I wonder if there is a way to know if the subscription status is Account Hold?

    Of course, there is no problem with processing subscriptionExpireDate values in SubscriptionInfo, even if they are in Account Hold status.

    However, I'm afraid it's a violation of Google policy when there's no processing when the subscription status is Account Hold.

    - Handling the subscription lifecycle: https://developer.android.com/google/play/billing/subs#lifecycle
    - Account hold: https://developer.android.com/google/play/billing/subs#account-hold
     
    Last edited: Sep 29, 2020
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I don't quite follow this statement "However, I'm afraid it's a violation of Google policy when there's no processing when the subscription status is Account Hold.". So doing no processing (nothing?) is a violation? But to your point, it sounds like a possible receipt change that we would indeed need to account for. We will look into this.
     
  9. sysper

    sysper

    Joined:
    Oct 11, 2014
    Posts:
    33

    I'm sorry for my poor English.

    I don't know if it is a violation of Google policy or not.
    So, in order to avoid this issue even further, I'm trying to follow Google's guidance.

    I find another article and post a link.
    - New features to acquire and retain subscribers: https://android-developers.googlebl...atures-to-acquire-and-retain-subscribers.html

    Thank you for looking to this issue!
    The best result is that we don't have to do anything. :)
     
    JeffDUnity3D likes this.
  10. unitylicense19

    unitylicense19

    Joined:
    Aug 29, 2018
    Posts:
    32
    https://android-developers.googleblog.com/2018/01/faster-renewals-for-test-subscriptions.html
    At the end of this it had tips on how we can test the account hold in test mode,
    I checked this and backend wise it worked fine, meaning i got gmail that renewal purchase has failed and it will cancelled if not reactivated, and then before 10 min ended i activated the card again in the play store and again i got saying subscription is renewed succesfully.

    According the account hold information in below link
    https://developer.android.com/google/play/billing/subs#account-hold

    1.
    When a subscription enters into account hold, you should block access to your content or service. The account hold period lasts for up to 30 days.

    2. "When a user enters into account hold, you should leverage Real-time developer notifications to inform your user why access to the subscription was suspended. Within your app, you should provide a message with instructions on how to fix their payment method and regain access to the subscription. Your message should include a link to the Google Play subscription settings so that they can fix their payment method. As an example, you might use a message similar to the following:"

    I wanted to know
    1. if the above 2 are a must to handle by the google play rules?
    2. If so how we can handle it
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    As mentioned previously, we will look into this and will likely be considered a feature request if we are able to support it. It will be several weeks to months before we can likely address feature requests, we currently have a backlog of task items.
     
  12. Soren_SZABO_Amuse

    Soren_SZABO_Amuse

    Joined:
    Jun 24, 2020
    Posts:
    1
    Hi Jeff,

    I do understand you need to prioritize certain features over others and I can imagine your list is quite long.
    However, Google states we need to implement the account hold feature by November 1st.

    I couldn't find any information on whether these changes could break our current IAP system in the Android Developers Blog. Does that mean every purchase made after that date could potentially fail because Unity's current IAP plugin isn't compatible with the changes Google made ?

    Thank you.
     

    Attached Files:

  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Interesting, I'll check with the IAP team.
     
    Soren_SZABO_Amuse likes this.
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We don't have immediate plans to support this feature. We don't believe it will affect purchasing.
     
    Soren_SZABO_Amuse likes this.
  15. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    @JeffDUnity3D This is popping up as a message in my Google Play console since this morning.

    Changes to subscription settings
    You must have account hold and restore implemented in your app by November 1, 2020. Subscription pause and resubscribe will also be enabled by default, unless you explicitly opt out.

    Am I safe to assume from the previous posts that Unity IAP is compliant with this requirement without my taking any further action?
     
    eskivor likes this.
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Hmmm, that is concerning. I will pass this along.
     
    Munchy2007 likes this.
  17. MochiBits

    MochiBits

    Joined:
    Mar 11, 2014
    Posts:
    30
    Also interested.

    Google does not specify what will happen if we don't support Account Hold and Restore.
     
    eskivor likes this.
  18. Fagic

    Fagic

    Joined:
    Feb 26, 2017
    Posts:
    8
    After having 1 user buy iap in my game.I received a notifcations as this below.How can I fixed this and update new version to google play.thank you so much! upload_2020-10-11_8-15-51.png
     
    Narek_Mart and LandonC like this.
  19. LandonC

    LandonC

    Joined:
    Dec 20, 2012
    Posts:
    83
    Got the same warning, I've emailed the google team but I don't have my hopes high.

    To the Unity Team. If our app does not use subscription services, would we need to make the account hold and restore changes as well?

     
    Narek_Mart and Fagic like this.
  20. Fagic

    Fagic

    Joined:
    Feb 26, 2017
    Posts:
    8
    So I want to ask if we don't fixed warning and then google have suspend our Apps?
     
    DanilLetov likes this.
  21. yuanzhuti

    yuanzhuti

    Joined:
    Oct 29, 2019
    Posts:
    2
    so, has any progress ? i'm faced the same problem..
     
  22. LemanColt

    LemanColt

    Joined:
    Oct 17, 2014
    Posts:
    15
    I also have the same question. Our game uses the Unity IAP plugin but we are not selling any subscriptions, we only have non-consumable iAPs.
    I saw this warning now for "Changes to subscription settings" on the google play console so wondering if anything needs to be done or if Unity iAP plugin will continue to work for non-subscription iAPs?
     
  23. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  24. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    hello is there a docs for Subscription pause and resubscribe in unity?
     
  25. andrefbr21

    andrefbr21

    Joined:
    Jan 27, 2013
    Posts:
    10
    Hello there, I am using In App Purchasing Version 2.0.3, I am receiving the same message from google, do I need to update the plugin, or should I keep this one that is working in production for years?

    Thank you very much.
     
  26. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please review previous messages. When we have information to share, we will post here https://forum.unity.com/threads/goo...ges-account-hold-restore.931914/#post-6409140
     
  27. james_unity480

    james_unity480

    Joined:
    Oct 16, 2020
    Posts:
    1
    Thanks for your help with this so far.
    At the risk of being signposted to a previous post and after reading the thread some more clarity would be really helpful.
    • Will Unity support this
    • When will we know if Unity will support this
    Any more information on what this means would be really helpful so we can plan and respond to keep our Android subs in live.
     
  28. MatthieuSmith_Unity3D

    MatthieuSmith_Unity3D

    Joined:
    Oct 16, 2020
    Posts:
    23
    Thank you all for your messages. I'd like to clarify some things about Google's message.

    I want to reassure you all, this message is sent to all Google clients. Even we have the message on our internal test apps. This is a welcome change from Google but does not require anything to be done on the app side.

    The changes only affect devs using a backend to validate and retrieve information from the Google Rest API. If you have a backend calling the Google Rest API, you must act as soon as possible and update your backend with the new changes. That being said, I feel like I must reiterate, nothing needs to be done for Unity IAP.

    Unity IAP uses the AIDL version of Google.
    https://developer.android.com/google/play/billing/api

    Don't be alarmed we know that the AIDL version will be sunsetting soon. We are hard at work getting a new version of IAP with Google Billing v3 enabled, but for now the current version of IAP will work fine after the 1st of November. More news and information will be given when the time comes.

    If you need more information about Goggle's Rest API and how to use it to validate your subscriptions and use their new features please visit https://developers.google.com/android-publisher#subscriptions
     
  29. unitycodergp

    unitycodergp

    Joined:
    Feb 1, 2017
    Posts:
    47
    Thx for this post.
     
  30. unitylicense19

    unitylicense19

    Joined:
    Aug 29, 2018
    Posts:
    32
    Thank you for the clarification. wanted bit more details on it.

    "When a subscription enters into account hold, you should block access to your content or service. The account hold period lasts for up to 30 days"
    "Your message should include a link to the Google Play subscription settings so that they can fix their payment method. As an example, you might use a message similar to the following:
    "There is a problem with your subscription. Click here to go to the
    Google Play subscription settings to fix your payment method."

    https://developer.android.com/google/play/billing/subs#account-hold - this link talks about how we should handle in client side once player goes into account hold state as sent above.
    Currently even though account hold itself may work but users will not get any notification of it inside the game.

    Is that fine as per google play? no changes are still required on our end?
     
  31. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    41
    Thanks for the info.

    Let me guess how it works: If an account goes into the dreaded "hold" state, SubscriptionInfo.isSubscribed() will return "FALSE" (or maybe "UNSUPPORTED"). Right? Also, is that enough?

    And, What about the Restore part? is the current UnityIAP compliant with it?
     
  32. MatthieuSmith_Unity3D

    MatthieuSmith_Unity3D

    Joined:
    Oct 16, 2020
    Posts:
    23
    Hey @unitylicense19,

    Indeed nothing needs to be done on your side.

    I don't want to bore you with how we implement Google Billing in Unity IAP but basically we call `queryPurchases` and send those purchases back and when the account is on hold it is not returned

    During account hold, the subscription is not returned by BillingClient.queryPurchases().

    from https://developer.android.com/google/play/billing/subs#account-hold

    So everything is handled already.
     
    Last edited: Oct 19, 2020
    LemanColt and Munchy2007 like this.
  33. unitylicense19

    unitylicense19

    Joined:
    Aug 29, 2018
    Posts:
    32
    Sorry for repeating myself, but again even though backend wise it will work and we don't need to any changes but the player will not get any notification from the game itself right, that is notifying player that your account is on hold and you have to fix your card

    If this notification is required, obviously script side we have to do changes right?
     
  34. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Not that we are aware of.
     
  35. gauravsl

    gauravsl

    Joined:
    Jun 21, 2019
    Posts:
    1
    Is there ANY way to reliably access the information through Unity IAP which would tell the app that the subscription status is 'on hold'?
     
  36. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Have you tested with an account that is On Hold? It's our understanding that no receipt will be returned.
     
  37. UnderTeam

    UnderTeam

    Joined:
    Nov 3, 2016
    Posts:
    1
  38. Archieonic

    Archieonic

    Joined:
    Sep 13, 2019
    Posts:
    14
    My question would fall under the mandatory features, namely account hold and resubscribe. As it is, I cannot enable "Resubscribe" under the following message on the console: "Resubscribe is not currently available for your users because your app does not use Billing Library 2.0 in all active APKs."

    This feature is supposed to be mandatory, although as usual, Google does an exceptionally horrible job at explaining details and their support is worse than useless. So, since this feature is mandatory, and my apks can't enable it because Unity uses AIDL, wouldn't that imply I'd have to change something? Implement Google Billing v3 manually?
     
  39. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No, that is not our understanding. It's only mandatory if you (the developer) are already and separately using their back end REST API to query subscription status.
     
  40. Archieonic

    Archieonic

    Joined:
    Sep 13, 2019
    Posts:
    14
    I see. I was quite concerned because my main app relies solely on subscriptions, and since Google doesn't really state what happens after the new features come into place, I'm quite nervous. I do not use their REST API.

    I did prepare an apk with Google Billing Library v3, but I did find it odd that on Google docs themselves, it says that billing library v3 does not support Unity's SubscriptionManager class, which would make the whole ordeal impossible for Unity devs. It's good to get confirmation from you about this, I had a few dev friends losing their minds with this as well. Thank you.
     
  41. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Archieonic Could I encourage you to start a new thread with regard to SubscriptionManager? That's a separate (and likely high priority) issue from Account Hold being discussed here, thanks. It will get better attention that way.
     
  42. Archieonic

    Archieonic

    Joined:
    Sep 13, 2019
    Posts:
    14
    Oh no, I assume Unity folks are already aware as they work on integrating Billing Library 3 into Unity's IAP (based on another thread. This only relates to users manually adding Billing Library 3.0). I only mentioned it since it confirms what you are saying that we Unity users don't have to make any changes, since Google's docs themselves mention it. I tried contacting Google support but they didn't know the answer.

    Not gonna lie, still a bit nervous about November 1st when this change kicks in since my main app relies only on subscriptions. Will check back in after the date.
     
  43. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, SubscriptionManager is a separate topic but I will reply once here. We have updated the SubscriptionManager to work with the new billing library when we release that version.
     
  44. lettuce_unity

    lettuce_unity

    Joined:
    Mar 5, 2019
    Posts:
    3
    Env :
    Unity 2018.4.17f
    Unity IAP 2.0.3

    I emailed Google for asking that is it essential to migrate from AIDL.
    They said migrating to Google Billing Lib is essential.

    Via this link (https://developer.android.com/google/play/billing/unity#subscription-manager)
    I don't even know how to use SubscriptionManager.
    We've used SubscriptionManager.
    @JeffDUnity3D You mentioned SubscriptionManager with the new billing library, How could I use it?
    which version of Unity IAP ???

    Even though It's Nov 9th, There's no problem on my App, I'm just watching... Is it Ok?
     
    Last edited: Nov 9, 2020
  45. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I would suggest a Google search for "unity iap subscription manager" If that doesn't help, then please open a new thread, this thread is discussing Account Hold. If you open a new thread, please clarify the following because they mean the opposite:

    I don't even know how to use SubscriptionManager.
    We've used SubscriptionManager.
     
  46. MatthieuSmith_Unity3D

    MatthieuSmith_Unity3D

    Joined:
    Oct 16, 2020
    Posts:
    23
    Hello @swlee_unity,

    Yesterday we officially released IAP 2.2.0 on the Asset Store which includes Google Billing Library v3.0.1 and the migration / deprecation to Google AIDL.

    https://forum.unity.com/threads/uni...0-is-now-available.415517/page-2#post-6506532

    If you update today you will not have to worry about the headache of updating your apps before the deadline which will happen in 2021, when Google officially deprecates their Google AIDL services.

    About the topic of SubscriptionManager, please refer to the post here: https://forum.unity.com/threads/google-play-billing-v3-and-subscriptionmanager.981699/#post-6508748
     
    Last edited: Nov 10, 2020
  47. DidzTM

    DidzTM

    Joined:
    Jan 30, 2018
    Posts:
    17
    Hi,

    When I follow the Google play Doc: https://developer.android.com/google/play/billing/unity

    When all is done, I have that build error who is returned :

    Like you say, you have included Google Billing Library v3.0.1.
    The problem that I have, if I don't import Google Billing Library v3.0.1 package, I have missing package error

    in the editor for Google.Play.Billing.GooglePlayStoreModule.

    How can I fix it ? For the moment, I have removing implementation(name: 'billing-3.0.1', ext:'aar') from gradle to compile.
    I'm not sure that's a good idea...

    Regards
     
    Last edited: Dec 2, 2020
  48. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please do not follow the Google documentation.
     
  49. DidzTM

    DidzTM

    Joined:
    Jan 30, 2018
    Posts:
    17
    Ok, I suppose I must keep this line like it was before :
    And I guess this module has implemented google billing , it is correct ?

    In any case you have to do something with google to have a common doc.
    It's a waste of time, two weeks in my case, because of their document... But mostly because of their new billing rules.
    And with google, you can't afford not to do what they say (very fast to put your game offline + slow to react with the client = minimum 1 week offline).

    Regards
     
  50. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We don't have any control over what Google publishes. And yes, Unity IAP already uses the Google Billing Library on Android, and Apple StoreKit on iOS.