Hello guys I have Unity IAP setup in my game following this tutorial https://learn.unity.com/tutorial/unity-iap# It works fine with consumable products. I am trying to setup subscription product now. It is called the same way and it worekd but I can't seem to find a way to answer to renew subscription. What callback is called on renew subscription? I found this https://forum.unity.com/threads/improved-support-for-subscription-products.532811/ but I don't know where to catch renew event.
Sorry, can you elaborate? Subscriptions renew automatically once you purchase them. What renew event are you referring to, what are you trying to accomplish?
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.
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.
@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)?
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.
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?
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.
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