Search Unity

Unity IAP Subscription

Discussion in 'Unity IAP' started by denmla1000, May 27, 2019.

  1. denmla1000

    denmla1000

    Joined:
    Jan 17, 2016
    Posts:
    10
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, can you elaborate? Subscriptions renew automatically once you purchase them. What renew event are you referring to, what are you trying to accomplish?
     
  3. denmla1000

    denmla1000

    Joined:
    Jan 17, 2016
    Posts:
    10
    When I purchase subscription product in test mode it lasts for 5 minutes and then renews.
    Is there a callback that will trigger that I can use to know when google tried to renew this subscription product?
    I want to know if I am to extend user subscription in game or not.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    When the game launches and IAP is initialized, you'll get the receipt at that time. You should get a ProcessPurchase callback. That is when you'll want to extend the subscription. This only happens during Initialization. You only want to check during app launch. If by chance the subscription expires during actual gameplay, you would not want to pull the product from the user, not a good experience. Just wait till the next app launch and let them know then.
     
  5. FEERtheGame

    FEERtheGame

    Joined:
    Apr 12, 2018
    Posts:
    7
    @JeffDUnity3D is this also true for the Apple App Store? Because - in the past - only the cached receipt on the user's device was read.

    So, if a user for example cancles a subscription, is this reflected in the receipt, which I got during initalization? Or, to put it another way, gets the receipt automatically refreshed, so that we can rely on the provided data (especially on the App Store)?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    This is something you'll want to test yourself to confirm. It's my understanding the receipt will get refreshed during initialization, but may take some time for the stores to do so. I've heard reports of several hours to a couple of days.
     
  7. tatecreative

    tatecreative

    Joined:
    Apr 24, 2017
    Posts:
    21
    Sorry, I don't follow. I have an iOS app, it uses IAP Subscriptions, I tested with the sandbox user and confirmed that the subscription works, great. However, I want to continue testing the subscription flow, but can't pull up the old window because the app is "unlocked" now that I've subscribed. That said, how can I kill the sandbox user's subscription?
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You can't. This is why you would want to configure several subscriptions to test with, and a few user/test accounts, for the same reason, and is how I test daily.
     
  9. denmla1000

    denmla1000

    Joined:
    Jan 17, 2016
    Posts:
    10
    Correct me if I am wrong but I saw test subscription renew automatically several times and then cancels itself.
    I tested with this test mechanics before and it seems that it worked this way always
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No, they don't automatically cancel.