How to detect iOS subscription renewing event triggered while game is running

Hello,
I’m using Unity IAP to buy subscriptions in my iOS game.
On sandbox, I buy a “1 month” auto-renewable subscription, then I have 5min countdown for my subscription.
After 5 min passed (game keeps running), I don’t receive any callback to know whether the subscription is auto renewed.

  • If I buy it again, I got the message “You are currently subscribed to this…”
  • If I relaunch app again, the subscription is auto renewed.

Is this an expected behavior or did I do something wrong? In my game, we show a countdown timer for the subscription that it will be expired.

Could you please help?
Thanks.

Hi, Unity IAP indeed does not fire any callback for a renewed transaction in-game. I guess this is because with regular subscription periods being at least 1 week and up to a year, the chance is usually very low that this happens while the user is in-game. It could be more of an issue though, with a countdown timer showing the exact minutes and then users waiting for the expiration (or renewal). I would usually recommend showing the renewal day only, not the exact timing.

As for the renewal on app launch - yes, since Unity IAP detects a new transaction happened in the meantime, the ProcessPurchase method is invoked again.