SDK error · code 26

productDiscountMissingIdentifierError (error code 26): Product discount missing identifier

What it means

productDiscountMissingIdentifierError (code 26) means an iOS product discount has no offer identifier, so the SDK cannot build a promotional offer for it. Introductory offers have no identifier, and only promotional offers do. Request a promotional offer only for discounts that carry an offerIdentifier, and make sure the offer exists in App Store Connect.

Code

26

iOS (Swift)

ErrorCode.productDiscountMissingIdentifierError

Android (Kotlin)

No matching code in the Android SDK; see the causes below.

Causes

Why the SDK returns productDiscountMissingIdentifierError

  • getPromotionalOffer(forProductDiscount:product:) was called with a discount whose offerIdentifier is nil (PurchasesOrchestrator.swift).
  • The discount is an introductory offer. Apple documents the offer identifier of a StoreKit 2 subscription offer as nil for an introductory offer (Apple docs).
  • The SDK's own description calls the missing identifier a likely App Store quirk: the wrapped SKProductDiscount or Product.SubscriptionOffer has none (ErrorCode.swift).
  • Android has no member for this code, because promotional offers are an Apple feature.

Fix

How to fix productDiscountMissingIdentifierError

  1. 01

    Filter discounts

    Offer a promotional offer only for discounts in product.discounts that have a non-nil offerIdentifier.

  2. 02

    Use eligiblePromotionalOffers

    eligiblePromotionalOffers(forProduct:) returns the offers the customer can use, so you never pass an unusable discount.

  3. 03

    Check App Store Connect

    Confirm the promotional offer exists, has an identifier and is approved. See Apple's guide to implementing promotional offers.

  4. 04

    Update the app and test on a device

    If a real promotional offer shows no identifier, report it with the product ID, since the SDK treats it as a store quirk.

In your app

How to handle it in code

  • Do not retry. The identifier will not appear.
  • Fall back to the regular price, and do not show the offer.
  • Do not grant access, and log the product ID.
Match the errorSwift
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .productDiscountMissingIdentifierError {
  // handle product discount missing identifier
}

On RevenueDot: RevenueDot is not involved. The SDK raises this error on the device before it asks the server to sign anything.

FAQ

productDiscountMissingIdentifierError: questions people ask

What is an offer identifier in StoreKit?

The ID of a promotional offer set up in App Store Connect. The SDK needs it to ask for a signed offer. Introductory offers have no such ID.

Does this error affect introductory offers?

No. Introductory offers are applied by the store without a signature. The error only affects promotional offers.

How do I check for productDiscountMissingIdentifierError in React Native and Flutter?

In React Native, compare error.code with PURCHASES_ERROR_CODE.PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.productDiscountMissingIdentifierError.

Get started

Keep the RevenueCat SDK. Change the backend.

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