Even with a properly configured Unity In-App Purchase (IAP) system, you may occasionally encounter issues during development, testing, or production. Most problems are caused by incorrect configuration, mismatched Product IDs, missing store settings, or network-related issues.
This guide covers the most common Unity IAP errors, explains why they occur, and provides practical solutions to help you resolve them quickly.
Complete the previous guides before continuing:
- Introduction
- Prerequisites
- Install Unity IAP
- Unity Gaming Services
- Create Products
- Consumable Purchases
- Non-Consumable Purchases
- Subscriptions
- Restore Purchases
- Receipt Validation
- Testing
- Best Practices
- Store appears empty
- Purchase buttons remain disabled
- Product information is missing
- Incorrect Product IDs
- Products not created in the store
- Unity IAP not initialized
- No internet connection
- Verify Product IDs match exactly.
- Confirm products are active in Google Play Console or App Store Connect.
- Wait for Unity IAP initialization before enabling purchase buttons.
- Test with an active internet connection.
- Purchase window closes unexpectedly
- Transaction does not complete
- Error message displayed
- User cancelled the purchase
- Billing service unavailable
- Network issue
- Product unavailable
- Handle cancelled purchases gracefully.
- Check internet connectivity.
- Verify the product is active.
- Test using a sandbox account.
- Purchase cannot start
- Product not found
- Typographical error
- Product ID mismatch
- Product not registered
Compare Product IDs across:
- Unity Project
- Google Play Console
- App Store Connect
Every Product ID must match exactly.
- Store never becomes available
- Initialization callback reports failure
- Unity Gaming Services not configured
- Internet unavailable
- Package installation issue
- Verify Unity Gaming Services setup.
- Confirm Unity IAP package installation.
- Restart Unity.
- Check Console for initialization errors.
- Previously purchased items are missing
- Wrong account
- Attempting to restore consumables
- Store communication issue
- Sign in using the original store account.
- Restore only non-consumables and subscriptions.
- Verify internet connectivity.
- Premium content remains locked
- Subscription appears inactive
- Subscription expired
- Validation failed
- Incorrect Product ID
- Verify subscription status.
- Refresh purchase information.
- Confirm Product IDs.
- Purchase completes but rewards are not granted
- Invalid receipt
- Corrupted receipt
- Validation logic error
- Test with valid sandbox purchases.
- Verify validation implementation.
- Check server logs if using backend validation.
- Player receives the same reward multiple times
- Purchase processed twice
- Missing transaction tracking
- Duplicate callbacks
- Track transaction IDs.
- Complete transactions properly.
- Prevent duplicate reward processing.
- Shop displays blank prices
- Placeholder text appears
- Products not loaded
- Initialization incomplete
- Store connection failed
Display prices only after Unity IAP finishes loading product metadata.
- Testing succeeds in Unity Editor
- Device purchases fail
- Local build installed manually
- Store configuration incomplete
- Test account missing
- Install builds through Google Play Internal Testing or TestFlight.
- Use sandbox accounts.
- Verify store configuration.
- Missing Restore Purchases option
- Incorrect subscription information
- Incomplete product metadata
- Add a Restore Purchases button.
- Complete App Store Connect configuration.
- Review Apple's submission guidelines.
When troubleshooting:
- Read Unity Console messages carefully.
- Check Product IDs first.
- Confirm Unity IAP initialization succeeds.
- Verify store configuration.
- Test on physical devices.
- Enable debug logging during development.
Before searching for advanced solutions, verify:
- Unity IAP installed
- Unity Gaming Services configured
- Product IDs match
- Products active in store dashboards
- Internet connection available
- Sandbox account configured
- Purchase restoration tested
- Receipt validation tested
- Android tested
- iOS tested
Most Unity IAP issues can be resolved by carefully reviewing these items.
When debugging production builds:
- Log initialization status.
- Log Product IDs.
- Log transaction IDs.
- Log purchase failures.
- Monitor analytics for failed transactions.
- Avoid exposing sensitive purchase information in logs.
Good logging significantly reduces debugging time after release.
You now know how to identify and resolve the most common Unity IAP issues.
The final guide in this repository answers frequently asked questions from Unity developers and provides quick references for common implementation scenarios.
- ← Best Practices
- → FAQ
You can also jump to any section of the guide: