com.unity.purchasing 5.6.0
Notes: processedReleased November 27, 2026
Browse versions
PreviousNext
Download Options
Direct package downloads captured from Unity's package registry.
Unity Compatibility
Minimum Unity: 2022.3
Package Dependencies
- com.unity.modules.androidjni (1.0.0)
- com.unity.modules.jsonserialize (1.0.0)
- com.unity.modules.unitywebrequest (1.0.0)
- com.unity.services.core (1.19.0)
- com.unity.services.deployment (1.7.2)
- com.unity.ugui (1.0.0)
Features
- Payment Providers - Added `IPaymentOptionProvider.ApplyBottomAnchoredLayout()`, `ApplyCenteredLayout()` and `ApplyAutomaticLayout()` to choose the Purchase Options UI's layout.
- Payment Providers - Added `IPaymentOptionProvider.SetLocale(string)` and `IPaymentOptionProvider.SupportedLocales`. The Purchase Options UI is now translated into English, French and Spanish and follows the device locale, the same one the checkout page uses (English otherwise); `SetLocale` overrides it. Badges are not translated.
- Payment Providers - Added a parameterless `IPaymentProvidersExtendedService.GetPaymentOptionProviderUITK()`.
- Payment Providers - Added `PurchaseFailureReason.ProductTypeNotSupported`. Subscriptions are not supported yet for Payment Providers, so purchasing one through a Payment Provider, or calling `GenerateURL` for one, now fails with this reason before any order is created. An order the server rejects for its product type (HTTP 422) fails with the same reason instead of `Unknown`, or `PurchasingUnavailable` when the compliance callback created it.
Improvements
- Fake Store - The dialog now scales with screen size and blocks clicks to the UI behind it.
- Google Play - A failed store connection is now only retried automatically for transient response codes. Others, such as `BillingUnavailable`, raise `OnStoreDisconnected` at once, and `IsRetryable` says whether calling `Connect()` again, e.g. after the user updates the Play Store, could succeed. See Google's billing response codes.
- Payment Providers - `GetPaymentOptionProviderUITK(UIDocument)` is obsolete: the UI Toolkit Purchase Options UI now renders on its own panel and ignores that `UIDocument`, so the game's style sheets no longer apply to it. To change its colors, add a style sheet with your `--color-*` overrides to its own `UIDocument`.
- Payment Providers - The Purchase Options UI (UGUI and UI Toolkit) has a new design and adapts to the device: anchored to the bottom on phones and centered on tablets, the same size across screen densities, inside the safe area, with at most three options and the webshop first, and it closes when the player taps outside it.
- Payment Providers - The payment option picker no longer offers a Payment Provider or the webshop for a subscription, as subscriptions are not supported yet for Payment Providers. The platform store option is still shown, and `ValidatePurchaseOption` returns `false` for an option list that routes a subscription to a Payment Provider.
- Payment Providers - `IPaymentProvidersExtendedPurchaseService.SetCustomMetadata` now throws an `ArgumentException` for metadata the Payment Provider backend doesn't accept: more than 20 entries, a key longer than 40 bytes or a value longer than 100 bytes in UTF-8, or a key or value containing a NUL character. The message names the rule that was broken, and the metadata set before is kept.
Bug Fixes
- Apple - Fixed the legacy `IAppleConfiguration.SetEntitlementsRevokedListener`, which threw an `InvalidCastException` on every revoked entitlement instead of calling the listener. The listener is now called with the revoked product. (Since Unity IAP 5.0.0)
- Apple (StoreKit 2) - Fixed `CheckEntitlement` returning `EntitledUntilConsumed` for an already confirmed consumable when `SKIncludeConsumableInAppPurchaseHistory` was enabled. It now returns `NotEntitled` once the purchase is confirmed.
- Fake Store - In projects that use only the Input System package (1.1.1 or later), the EventSystem that the dialog and the UGUI Purchase Options UI create when the scene has none now responds to input.
- Google Play - A failed store connection now reports Google's billing response code and debug message in `StoreConnectionFailureDescription.message`.
- Payment Providers - In the Purchase Options UI (UGUI and UI Toolkit), disposing the provider while `ShowPurchaseOption(string)` is waiting for payment provider eligibility, for example on a scene change, now returns `null` instead of throwing a `NullReferenceException`.
