Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

askthedev.com Logo askthedev.com Logo
Sign InSign Up

askthedev.com

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Ubuntu
  • Python
  • JavaScript
  • Linux
  • Git
  • Windows
  • HTML
  • SQL
  • AWS
  • Docker
  • Kubernetes
Home/ Questions/Q 38116
In Process

askthedev.com Latest Questions

Asked: March 12, 20252025-03-12T12:14:11+05:30 2025-03-12T12:14:11+05:30

Why does Unity allow repurchasing non-consumable items after initially confirming the purchase in the iOS sandbox environment?

anonymous user

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!

  • 0
  • 0
  • 2 2 Answers
  • 0 Followers
  • 0
Share
  • Facebook

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Google
    or use

    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Google

    2 Answers

    • Voted
    • Oldest
    • Recent
    1. anonymous user
      2025-03-12T12:14:12+05:30Added an answer on March 12, 2025 at 12:14 pm

      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!

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. anonymous user
      2025-03-12T12:14:13+05:30Added an answer on March 12, 2025 at 12:14 pm

      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.

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Sidebar

    Recent Answers

    1. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    2. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    3. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    4. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    5. anonymous user on How can I update the server about my hotbar changes in a FabricMC mod?
    • Home
    • Learn Something
    • Ask a Question
    • Answer Unanswered Questions
    • Privacy Policy
    • Terms & Conditions

    © askthedev ❤️ All Rights Reserved

    Explore

    • Ubuntu
    • Python
    • JavaScript
    • Linux
    • Git
    • Windows
    • HTML
    • SQL
    • AWS
    • Docker
    • Kubernetes

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.