Code
5
SDK error · code 5
What it means
productNotAvailableForPurchaseError (code 5) means the store has no purchasable product for this customer: the product ID is missing or not approved, it is not sold in the customer's storefront, or Google Play reports the item as unavailable. Check the product in App Store Connect or Play Console and in your offering. Do not retry the same call.
Code
5
iOS (Swift)
ErrorCode.product
Android (Kotlin)
PurchasesErrorCode.Product
Causes
SKError.storeProductNotAvailable, the requested product is not available in the store.StoreKitError.notAvailableInStorefront and Product.PurchaseError.productUnavailable (source).ITEM_UNAVAILABLE. Google describes it as a product that is not available for purchase for this user and says to refresh product details and check the product's configuration (Google docs).INVALID_SKU for the purchase request.Fix
In App Store Connect or Play Console, confirm the product exists, is not in a rejected or missing-metadata state, and is sold in the customer's country.
The ID in your offering must equal the store product ID. A Google subscription matches its subscription ID or <subscription id>:<base plan id>.
A new product can take a while to reach the store. Test again later with a fresh install.
For Test Store products, give the product a Test Store price on the dashboard. Without one the Android SDK reports it as unavailable.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .productNotAvailableForPurchaseError {
// handle product not available for purchase
}
// Kotlin
if (error.code == PurchasesErrorCode.ProductNotAvailableForPurchaseError) { /* ... */ } On RevenueDot: Your offering's packages point at products by their store identifier, and the SDK asks the store for exactly that ID. If a product's store_identifier in RevenueDot does not equal the store's ID, the store answers with no product. See why an entitlement is not active.
FAQ
The store has no purchasable product for this customer: the product ID does not match, the product is not approved or ready, or it is not sold in the customer's country. Compare the ID in your offering with the one in the store.
Google's code for a product that is not available for purchase for this user. Google says to refresh the product details and check the product configuration and eligibility (Google docs).
In React Native, compare error.code with PURCHASES_ERROR_CODE.PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.productNotAvailableForPurchaseError.
Get started
RevenueDot answers the same SDK calls with the same error codes. Start free on RevenueDot Cloud, free up to $10,000 a month in tracked revenue.
Already have an account? Sign in · Prefer your own servers? Self-host free