---
title: "What does Product.PurchaseError.purchaseNotAllowed mean?"
description: "Product.PurchaseError.purchaseNotAllowed means the person is not allowed to make purchases. Screen Time limits or a device management profile can cause it."
url: https://revenuedot.app/docs/errors/storekit-purchase-error-purchase-not-allowed
---

# What does Product.PurchaseError.purchaseNotAllowed mean?

Product.PurchaseError.purchaseNotAllowed means the person on this device is not allowed to make purchases.

## Quick facts

| | |
|---|---|
| Error | `Product.PurchaseError.purchaseNotAllowed` |
| Where | StoreKit 2, Swift (`Product.purchase(options:)`) |
| Available since | iOS 15.0, iPadOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, visionOS 1.0 |
| What the vendor says | The user is not allowed to make purchases. |

## Cause

- Apple's `AppStore.canMakePayments` page lists two conditions that make it `false`: Content & Privacy Restrictions in Screen Time that prevent purchases, and a mobile device management (MDM) profile that prevents purchases ([AppStore.canMakePayments](https://developer.apple.com/documentation/storekit/appstore/canmakepayments)).
- Apple documents `purchaseNotAllowed` as the user not being allowed to make purchases, which is the state those two conditions put the device in. Apple does not list other triggers.
- It is a setting on the device or account, so retrying does not help until the person or an administrator changes it.

## Fix

1. Check `AppStore.canMakePayments` before you show the buy button. Apple says that when it is `false` you should not offer In-App Purchases.
2. Tell the person purchases are turned off on this device, and point them to Screen Time or their administrator.
3. Show the paywall again on the next launch, because the setting can change.
4. Do not retry the purchase and do not unlock content.

## Example

```swift
import StoreKit

// Ask first: when the device cannot make payments, show a message instead of a buy button that always fails.
func buy(_ product: Product) async {
    guard AppStore.canMakePayments else {
        print("Purchases are turned off on this device")
        return
    }
    do {
        _ = try await product.purchase()
    } catch Product.PurchaseError.purchaseNotAllowed {
        print("The App Store says this person is not allowed to buy")
    } catch {
        print("Purchase failed: \(error)")
    }
}
```

*Compile-checked: `npm run check:snippets` type-checks this snippet with `swiftc` against the Apple SDK (macOS target, checked 2026-10-03).*

## How the RevenueDot SDK reports it

The RevenueDot `purchases-ios` fork maps `Product.PurchaseError.purchaseNotAllowed` to `ErrorCode.purchaseNotAllowedError` (code 3). The SDK offers `Purchases.canMakePayments()` for the same check. See [what purchaseNotAllowedError means](https://revenuedot.app/docs/errors/sdk-purchase-not-allowed-error.md).

## Related

- [What does purchaseNotAllowedError (code 3) mean in the purchases SDK?](https://revenuedot.app/docs/errors/sdk-purchase-not-allowed-error.md)
- [What does StoreKitError.userCancelled mean?](https://revenuedot.app/docs/errors/storekit-error-user-cancelled.md)
- [What does Play Billing BILLING_UNAVAILABLE (3) mean?](https://revenuedot.app/docs/errors/play-billing-billing-unavailable.md)

## Source

- [Apple: AppStore.canMakePayments](https://developer.apple.com/documentation/storekit/appstore/canmakepayments)
- [Apple: Product.PurchaseError.purchaseNotAllowed](https://developer.apple.com/documentation/storekit/product/purchaseerror/purchasenotallowed)
- [Apple: Product.PurchaseError](https://developer.apple.com/documentation/storekit/product/purchaseerror)
- [RevenueDot purchases-ios: StoreKitError+Extensions.swift (how the SDK maps StoreKit 2 errors)](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Error%20Handling/StoreKitError%2BExtensions.swift)

Checked: 2026-10-03
