I’ve been tearing my hair out over this issue with non-consumable in-app purchases in Unity, and I’m hoping someone here can shed some light on what’s going on. So, here’s the scoop: I’m working with Unity 2022.3.55f1 and In-App Purchasing v4.12.2 on my iPhone 15 running iOS 18.1.1. Everything’s set up fine, and I initially allowed IAPs in my iOS settings.
The trouble started when I purchased a non-consumable item for the first time successfully by entering my password. No hiccups there. I thought all was well and good. But then I decided to mess around with some iOS settings. I put the In-App Purchases option to “Don’t Allow” and returned to my game. Naturally, when I tried to buy the same non-consumable item again, I expected it to block me since I had restricted the purchases. And it did! The app recognized that I couldn’t make any purchases, which was great.
But here’s where things get strange. I went back, toggled the iOS settings to “Allow” IAPs once again, and resumed my game. When I tried to buy the non-consumable item the second time, a pop-up appeared saying, “You’ve already purchased this. Would you like to get it again for free?” Wait, what? Why is it offering to let me purchase it again? I thought non-consumable items were meant to only be bought once.
So, my main question is: if I proceed with this “buy it again” option, will it end up charging me again? Or is this just a quirk of the sandbox environment? I can’t wrap my head around why the system is behaving this way. Is this typical behavior for Unity’s In-App Purchasing system, or am I messing up the purchase flow somehow? I’d love to hear any insights or experiences you all might have had with this. Thanks!
It sounds like you’re encountering a pretty common issue, especially if you’re new to IAP in Unity! Non-consumable items are supposed to be purchased only once, but it can definitely get confusing!
So, when you initially bought the non-consumable item, that was all good, and your game should remember that you’ve bought it. But when you disabled IAPs and then re-enabled them, the pop-up message you saw about purchasing it again is a bit misleading.
In a sandbox environment, sometimes things don’t behave exactly like they would in a live app. The pop-up might just be part of how the testing environment handles receipts. It’s typically a quirk of the sandbox! When it says “Would you like to get it again for free?” it usually means you wouldn’t be charged again since Apple tracks non-consumable items and won’t let you buy them a second time if you already own it.
It might be a good idea to try it out, but since you’re in the sandbox, you won’t actually be charged again. Just keep in mind that in a live app, the behavior might be slightly different and it should recognize your purchase without prompting again.
If you’re still having doubts, you can always check the Apple developer documentation or forums for more insights on how non-consumable items should behave. Don’t worry too much — IAP can be tricky to get the hang of at first!
This behavior you’re seeing is actually typical, especially within the iOS sandbox environment. Non-consumable purchases in iOS are meant to be made only once per account, and Apple tracks these purchases server-side. Because you’ve previously completed the purchase successfully, the App Store recognizes your existing entitlement, prompting the message “You’ve already purchased this. Would you like to get it again for free?”. Selecting this option is safe and will not charge you again; instead, it will simply restore the already applied purchase.
In production, attempting to purchase the same non-consumable item again should always trigger the same dialog reassuring users they won’t be charged twice. Your purchase logic seems correct from what you’ve described, as the Unity IAP system relies on Apple’s validation of ownership and shouldn’t charge again. Ensure that you also implement a restore purchases function clearly within your app interface, as required by Apple, so users can restore previously bought non-consumable items if they reinstall or update their app. This scenario you’re encountering is quite normal in sandbox testing and shouldn’t indicate an issue in your purchasing flow.