Problem - Unity IAP Purchase Not Completing
You have integrated Unity In-App Purchasing (IAP), the store overlay appears, and the player can attempt a purchase, but:
- The purchase never calls your success callback, or
- The purchase appears to go through but the product is not granted, or
- The purchase hangs on "processing" and does not finish.
This can happen on Google Play, Apple App Store, or other stores using Unity IAP or the newer Unity Gaming Services IAP package.
This article walks through the most common reasons purchases fail to complete and how to fix each one.
Root Causes - Why Purchases Get Stuck
Most “purchase not completing” issues fall into a few categories:
- Initialization problems – IAP is not fully initialized when you start a purchase.
- Product configuration mismatches – Product IDs or types differ between code, dashboard, and store.
- Callback logic errors –
ProcessPurchaseor equivalent handlers do not return the correct result or throw exceptions. - Receipt and sandbox issues – Test accounts, pending transactions, or unprocessed receipts block new purchases.
- Platform-specific quirks – Required app setup is incomplete (store configuration, test users, agreements).
We will fix these one by one.
Step 1 - Verify IAP Initialization Before Purchasing
Unity IAP must be fully initialized before you call InitiatePurchase (or the equivalent method).
Checklist:
- Confirm that your initialization code runs once on app start (usually in a
DontDestroyOnLoadmanager). - Make sure your store listener’s
OnInitializedcallback is actually invoked. - Do not show purchase buttons as active until initialization is complete.
If you call InitiatePurchase before initialization:
- The call may be ignored.
- The store UI may not appear.
- The purchase may never trigger
ProcessPurchase.
Fix:
- Track an
isInitializedflag in your IAP manager. - Only allow purchase attempts when
isInitializedis true.
Step 2 - Confirm Product IDs and Types Match Everywhere
Purchases will not complete if product configuration is inconsistent.
Check:
- Unity code – The product IDs in your catalog or configuration.
- Unity dashboard or IAP catalog – The product definitions you created.
- Store console – Google Play Console, App Store Connect, or other platform dashboards.
Common pitfalls:
- Mismatched case or subtle typos in product IDs.
- Setting a product as consumable in one place and non-consumable in another.
- Using test IDs or old IDs that no longer exist in the store.
Fix:
- Choose a single, exact product ID string for each item.
- Update code and dashboards so they all use that exact ID.
- Redeploy and verify that the product appears in the IAP catalog at runtime.
Step 3 - Check Your Purchase Callback Logic
Even when the store processes a purchase, your callback logic can prevent completion.
In typical Unity IAP flows, your purchase handler must:
- Grant the product (coins, premium status, etc.).
- Return a status such as
Complete(or the equivalent for your IAP package).
If your handler:
- Throws an exception,
- Never returns, or
- Returns the wrong result (for example,
Pendingwhen you meantComplete),
the purchase may remain in a pending state and be retried or appear incomplete to the user.
Fix:
- Add logging to your purchase callbacks so you can see:
- When they are called,
- Which product is being processed,
- What result you return.
- Make sure you always return a clear result value and do not depend on exceptions for control flow.
Step 4 - Clear Pending or Cached Transactions During Testing
In sandbox and test environments, incomplete or cached transactions can block new purchases.
Symptoms:
- Test devices show repeated “you already own this item” messages.
- The store never asks for confirmation again.
- New test purchases do not reach your game.
Approach:
- On some platforms, you may need to:
- Consume consumable purchases explicitly.
- Clear or acknowledge pending transactions.
- Use fresh test accounts if the current one is stuck.
Check your platform documentation for:
- How to clear pending purchases.
- How to consume consumable products.
- How to reset or remove test purchases for sanboxes.
Step 5 - Validate Platform Setup and Test Accounts
If you are testing on a real device:
- Ensure you are using the correct test account (test user on Google Play, sandbox user on Apple).
- Verify that your game build is:
- Installed from the correct source (store-signed where required).
- Using the bundle identifier or package name that matches your store configuration.
Common oversights:
- Running a development build side-loaded on Android but expecting production IAP behavior.
- Using a regular Apple ID instead of a sandbox account for iOS testing.
- Missing or incomplete agreements and tax/banking setup in the store console.
Fix:
- Double-check the bundle ID/package name in both the store and Unity project settings.
- Confirm that required agreements and settings in the store console are complete.
- For iOS, sign out of non-sandbox Apple IDs and sign in with the sandbox tester account when prompted.
Step 6 - Add Logging and a Simple Test Harness
Without logs, it is hard to see where the purchase gets stuck.
Add:
- Logs before and after
Initializecalls. - Logs when
OnInitializedandOnInitializeFailedfire. - Logs at the start and end of your purchase callback logic, including the product ID and result code.
Create a simple test UI:
- A screen with:
- An initialization status indicator.
- A test purchase button for a single known product.
- A log window or console output showing recent IAP-related messages.
This makes it easier to isolate IAP behavior from the rest of your game logic while you debug.
Step 7 - Verify the Fix on Each Target Store
Once you believe the issue is fixed:
- Test on Google Play with a test user:
- Confirm that the purchase dialog appears.
- Check that your purchase callback fires.
- Ensure that the item is granted and the purchase is marked complete.
- Test on App Store with a sandbox account:
- Repeat similar steps, watching for differences in prompts or flows.
- For any other stores or platforms you support, repeat the process with platform-specific tools and logs.
If a purchase still does not complete on a specific platform:
- Re-check that platform’s billing library documentation.
- Confirm that any required permissions or capabilities are enabled in your project.
Prevention Tips - Keeping IAP Stable Long-Term
- Treat IAP like a critical system, not a last-minute addition.
- Keep a single IAP manager responsible for initialization, catalog loading, and purchase handling.
- Use strongly typed product IDs (constants or enums) instead of raw strings scattered throughout the codebase.
- Include IAP tests in your release checklist:
- One test purchase per platform,
- Verification that success callbacks still fire after major code changes.
Related Issues and Next Steps
If you fixed purchases not completing but still see unexpected behavior:
- For missing UI clicks or non-functional store buttons, see Unity UI Elements Not Clickable - Canvas/Event System Fix.
- For analytics not reflecting purchases, check your analytics pipeline with help articles about Analytics events not tracking.
- For build or store submission errors, cross-reference publishing-focused help articles in the same help section.
Found this useful? Bookmark it for your next release and share it with your team so everyone has a reliable reference when debugging IAP issues.