Summary:
This article explains why Unity IAP’s ProductDefinition shows the same value for ID and storeSpecificID when integrating in‑app purchases. In most cases, Unity’s constructor assigns the same identifier to both fields, which is expected behaviour. Differences only appear when developers intentionally configure distinct store-specific IDs per platform. Understanding this behaviour helps avoid confusion when reviewing product configurations and ensures developers correctly interpret Unity IAP’s product identifiers across app stores.
Symptoms:
- Observing that ProductDefinition.ID and ProductDefinition.storeSpecificID have the same value when using Unity IAP with Apple in-app purchases.
- Uncertainty about whether it is normal or correct for ID and storeSpecificID to be identical.
Cause:
Unity IAP’s ProductDefinition constructor, by default, sets both ID and storeSpecificID to the same value when a simple constructor is used or when the same product ID is used across all platforms. Differences only occur if the developer explicitly defines separate store-specific IDs for different stores (for example, using different identifiers for Apple and Google).
It is expected and correct behaviour for ProductDefinition.ID and ProductDefinition.storeSpecificID to be identical in Unity IAP when:
- The simple ProductDefinition constructor is used without specifying store-specific IDs.
- The same product ID is reused across all platforms (e.g., Apple and Google).
They will differ only if you explicitly assign different store-specific IDs per store (e.g., an internal ID like “gold_coins_100” and platform-specific IDs such as “com.app.gold100” for Apple and “gold_100” for Google). No further action is required if the values are equal under the default configuration.