Search Unity

Google Play Introductory Pricing

Discussion in 'Unity IAP' started by mbaker, Jun 15, 2018.

  1. mbaker

    mbaker

    Joined:
    Jan 9, 2013
    Posts:
    52
    Hi,

    Is it possible to get the introductory price for a product in Unity IAP 1.19.0? Looking at the native libraries it seems the information is available in the native SKUDetails object but the information isn't passed through to Unity as far as I can tell.

    Is there some equivalent to
     ExtensionProvider.GetExtension<IAppleExtensions>().GetIntroductoryPriceDictionary()
    on Google Play?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. mbaker

    mbaker

    Joined:
    Jan 9, 2013
    Posts:
    52
    @JeffDUnity3D This seems to only work if your product has a receipt. Not really useful for a user at that point. Is there a way to retrieve introductory prices before the product has been purchased?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Good point! I just checked with the IAP team, and the next release of IAP (hopefully within a few weeks) will have this functionality, and will have a skuDetails object with this information, whether it was purchased or not.
     
  5. mbaker

    mbaker

    Joined:
    Jan 9, 2013
    Posts:
    52
    Great! Looking forward to it.

    If it's at all possible it would be really awesome if we had C# access to the historical receipts that the native side stores in the Inventory object. We would use that to correctly address/market to users based on whether they are users that have previously owned a subscription or not.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @mbaker I just submitted a feature request on your behalf to the IAP team, thanks for the input!
     
  7. mbaker

    mbaker

    Joined:
    Jan 9, 2013
    Posts:
    52
    Great, thanks! My laundry list of fixes with Ming is getting long :)
     
  8. kenny_cj

    kenny_cj

    Joined:
    Feb 12, 2015
    Posts:
    4
    Hey! I have an issue about that, any news on the possibility to create a subscriptionmanager for a product with no receipt ? If not what would be the best way to handle that at the moment ?

    Thanks
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @kenny_cj I'll check with the IAP team on the status of this issue
     
  10. Biggix

    Biggix

    Joined:
    Dec 8, 2014
    Posts:
    44
    Hey, I'm also trying to fetch the introductory pricing before the user makes a purchase - and I'm not having success with it. Is there a solution, both for Google Play and iOS?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    This is a feature we are hoping to include in the next release, but no specifics yet.
     
  12. piyushpandeyDrpanda

    piyushpandeyDrpanda

    Joined:
    Dec 17, 2018
    Posts:
    9
    Hi,
    Is there any way we can check the introductory price if we do NOT have the receipt(the product is not bought)?

    What we want is:- [platform iOS, version 11 and above]
    1) Start the App for the first time.
    2) Check if there is an "introductory" price {at this time we do NOT have the receipt since the user has not bought anything}
    3) Show the user introductory price offer.

    Is this possible in any way?

    When i tried this, the "getSubscriptionInfo()" method in SubscriptionManager class throws null {the SubscriptionManager is properly intialized}
     
  13. mradel

    mradel

    Joined:
    Jan 16, 2018
    Posts:
    10
    Hi,

    I guess this feature did not get into the last update, UnityIAP 1.22.0?
    Any chance that this feature (being able to fetch the introductory pricing before the user makes a purchase to display an offer) would still be planned for a future update?

    Thanks
     
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, it's there. There is a GooglePlay store extension function that user can use to get the SkuDetails of a product like the following:

    {"productId":"sub3","type":"subs","price":"$1.99","price_amount_micros":1990000,"price_currency_code":"USD","subscriptionPeriod":"P1W","freeTrialPeriod":"P3D","introductoryPriceAmountMicros":990000,"introductoryPricePeriod":"P1W3D","introductoryPrice":"$0.99","introductoryPriceCycles":1,"title":"sub3 (demo6)","description":"sub3"}

    You can use the following code to get this info:

    private IGooglePlayStoreExtensions m_GooglePlayStoreExtensions = extensions.GetExtension<IGooglePlayStoreExtensions>();
    Dictionary<string, string> productJSONDetails = m_GooglePlayStoreExtensions.GetProductJSONDictionary();

    The ProductJSONDetails is a dictionary where the key is product id and the value is the product's JSON detail which is got from google play store (which does not need to have a receipt, all the valid products that configured in the UnityIAP will have this information.(https://developer.android.com/google/play/billing/billing_reference#getSkuDetails)

    For iOS

    Dictionary<string, string> introductory_info_dict = m_AppleExtensions.GetIntroductoryPriceDictionary();
    Dictionary<string, string> product_details = m_AppleExtensions.GetProductDetails();
     
    Egil-Sandfeld likes this.
  15. Fee_Xue

    Fee_Xue

    Joined:
    Dec 13, 2017
    Posts:
    7

    Hi @JeffDUnity3D ,

    As we known, the introductory offer has three offer types "pay as you go", "pay up front" and "free trial".

    Currently, I can only use "introductoryPriceAmountMicros" to know if it is free trial. While I can not find the way to distinguish pay as you go and pay up front. Actually, I am trying to use "introductoryPriceCycles" to check it, but pay as you go and pay up front both have chance to set "introductoryPriceCycles":"1". So this way is not a perfect way to handle it. Could let me know if there is an another way to distinguish them?

    thanks,
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'm not familiar with those values. If you are not seeing them with the existing IAP, then would be considered a feature request. However, we have not heard of this request before, so there is a good chance it won't be implemented, to properly set expectations. We try to avoid changing such a core feature without introducing risk.
     
  17. Fee_Xue

    Fee_Xue

    Joined:
    Dec 13, 2017
    Posts:
    7
    Thanks for your reply,

    All the values are from SkuDetails of a product like you mentioned before. Actually, I want to access the Introductory Offer's type (we can also call it "payment mode"). I did not find that for in google.

    but for iOS,
    it supports an enumeration to define the payment mode.
    https://developer.apple.com/documen...iscountpaymentmode?language=objc#declarations

    If this is NOT implemented in unity IAP, is that possible to add this one in next update.

    Thanks
     
  18. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I don't quite follow. Where are you seeing those additional values in SkuDetails? We do not add any values, this is the information we receive directly from the store, we are only a pass through service. If this is something you want to add to the details, you would want to reach out to Google. Or are you saying that Google returns the information that you desire, but we don't expose it in IAP?
     
  19. Lurendium

    Lurendium

    Joined:
    Nov 25, 2016
    Posts:
    8
    Hi @JeffDUnity3D ,

    There is small problem as SKUDetails or Unity IAP plugin can't get "SKProductDiscountPaymentMode" on iOS, so there when you try to setup Introductory Price for your subscription product there is no way to tell difference between "Pay as you go" or "Pay up front" options.



    In iOS you can get this information from SKProductDiscount.PaymentMode here is the link for more information:
    https://developer.apple.com/documentation/storekit/skproductdiscount/2936874-paymentmode

    I was wondering if there is a way to get this data in unity right one without making own plugin.

    One more small think I find in Unity IAP plugin is this enum:

    upload_2019-8-1_11-48-42.png

    If you try to use to convert iOS or Google Intro Period Unit it will incorrect as iOS and Google order is Day, Week, Month not Day, Month, Week.

    Thanks
     
  20. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I will mention this feature request to the IAP team, and maybe get it in later this year.
     
  21. Lurendium

    Lurendium

    Joined:
    Nov 25, 2016
    Posts:
    8
    Thank you for a fast replay, I will be looking forward to it.
     
  22. appxplore-tech

    appxplore-tech

    Joined:
    Jul 4, 2012
    Posts:
    62
    Hi,

    For iOS, if i wanted to get the formattedPrice, what i can do, as i checked from the IntroductoryPriceDictionary, it doesn't have a formattedPrice for me to display. Please help!
     
  23. appxplore-tech

    appxplore-tech

    Joined:
    Jul 4, 2012
    Posts:
    62
    And Another questions, is there a way for me to know if such players purchase any subscription before? or if the player entilted for Introductory price?
     
  24. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You can use a cloud save feature like offered by ChilliConnect or PlayFab
     
  25. genkuro_otsuka

    genkuro_otsuka

    Joined:
    Feb 24, 2016
    Posts:
    5
    Hello.
    Is it possible to flag a free trial before purchasing an item?
    Currently I am suffering because I can not do this.
    Thanks.
     
  26. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We have not found a reliable solution yet. The "isFreeTrial" is not sufficient, and doesn't answer the following questions. Does the product have a free trial? Has the customer used a free trial previously? Is the user in a free trial currently? We are hoping to use updated store billing libraries next year that will hopefully expose these properties.
     
  27. Kodo

    Kodo

    Joined:
    Sep 6, 2014
    Posts:
    18
    Hello, any solution for get Introductory Price and Period without receipt, before the product has been purchased?
     
  28. ilijauro

    ilijauro

    Joined:
    Apr 26, 2022
    Posts:
    1
    It should be in product.metadata and then store specific meta data.
    But right now im not getting after a purchase on android if it is trial purchase or not on Google play
     
  29. marvpaul

    marvpaul

    Joined:
    May 9, 2016
    Posts:
    32
    Took me a second to figure out that this is deprecated and the docs suggest you should use product.metadata.GetGoogleProductMetadata() instead. Perhaps this helps someone