---
title: "What does productNotAvailableForPurchaseError (code 5) mean in the purchases SDK?"
description: "productNotAvailableForPurchaseError (code 5) means the store has no purchasable product for this customer. Check the product ID, its state and its regions."
url: https://revenuedot.app/docs/errors/sdk-product-not-available-for-purchase-error
---

# What does productNotAvailableForPurchaseError (code 5) mean in the purchases SDK?

The purchases SDK raises productNotAvailableForPurchaseError (code 5) when the store reports the product as unavailable for this customer.

## Quick facts

| | |
|---|---|
| Error | `ErrorCode.productNotAvailableForPurchaseError` (iOS), `PurchasesErrorCode.ProductNotAvailableForPurchaseError` (Android), code 5 |
| Where | Purchases SDK (iOS, Android and the hybrid SDKs built on them) |
| What the vendor says | The product is not available for purchase. |

## Cause

- StoreKit 1: `SKError.storeProductNotAvailable`. StoreKit 2: `StoreKitError.notAvailableInStorefront` and `Product.PurchaseError.productUnavailable`.
- Android: Play Billing `ITEM_UNAVAILABLE`. Google says to refresh product details and check the product's configuration and country availability.
- In the RevenueDot Android SDK's Test Store, a product with no price also raises this error.

## Fix

1. Check the product in App Store Connect or Play Console: it must exist, be approved or active and be sold in the customer's country.
2. Match the product ID exactly. The ID in your offering must equal the store's product ID.
3. Wait after you create a product, then test again with a fresh install.
4. Hide the package so the customer is not stuck on a button that cannot work.

## Example

```swift
// The purchases SDK throws `ErrorCode` values; match the one you handle and let the rest fall through.
func handle(_ error: Error) {
    guard let code = error as? ErrorCode else {
        print("Not a purchases SDK error: \(error)")
        return
    }
    switch code {
    case .productNotAvailableForPurchaseError:
        // Do not retry the same call: hide the package and log the product ID.
        print("The product is not available for purchase")
    default:
        print("Other purchases error: \(code.description)")
    }
}
```

*Compile-checked: `npm run check:snippets` type-checks this snippet with `swiftc` together with the `ErrorCode.swift` file of the RevenueDot `purchases-ios` fork (checked 2026-10-03).*

## How the RevenueDot SDK reports it

In RevenueDot, a product whose `store_identifier` differs from the store's ID returns no product from the store. See [why an entitlement is not active](https://revenuedot.app/docs/help/entitlement-not-active.md). Deep dive: [revenuedot.app/errors/product-not-available-for-purchase-error](https://revenuedot.app/errors/product-not-available-for-purchase-error).

## Related

- [What does StoreKitError.notAvailableInStorefront mean?](https://revenuedot.app/docs/errors/storekit-error-not-available-in-storefront.md)
- [What does Product.PurchaseError.productUnavailable mean?](https://revenuedot.app/docs/errors/storekit-purchase-error-product-unavailable.md)
- [What does Play Billing ITEM_UNAVAILABLE (4) mean?](https://revenuedot.app/docs/errors/play-billing-item-unavailable.md)
- [What RevenueDot's API errors mean (server codes)](https://revenuedot.app/docs/api/errors.md)

## Source

- [RevenueDot purchases-ios: ErrorCode.swift (the iOS ErrorCode enum)](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Generated/ErrorCode.swift)
- [RevenueDot purchases-android: PurchasesErrorCode.kt (the Android enum)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/generated/com/revenuecat/purchases/PurchasesErrorCode.kt)
- [RevenueDot purchases-ios: StoreKitError+Extensions.swift](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Error%20Handling/StoreKitError%2BExtensions.swift)
- [RevenueDot purchases-android: google/errors.kt (Play Billing mapping)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/com/revenuecat/purchases/google/errors.kt)

Checked: 2026-10-03
