SDK error · code 28

productDiscountMissingSubscriptionGroupIdentifierError (error code 28): Missing subscription group ID

What it means

productDiscountMissingSubscriptionGroupIdentifierError (code 28) means the iOS product has no subscription group identifier, so the SDK cannot create a signed promotional offer for it. Only auto-renewable subscriptions belong to a group. Request promotional offers only for subscription products, and confirm the product sits in a subscription group in App Store Connect.

Code

28

iOS (Swift)

ErrorCode.productDiscountMissingSubscriptionGroupIdentifierError

Android (Kotlin)

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

Causes

Why the SDK returns productDiscountMissingSubscriptionGroupIdentifierError

  • getPromotionalOffer(forProductDiscount:product:) was called with a product whose subscriptionGroupIdentifier is nil (PurchasesOrchestrator.swift).
  • The product is not an auto-renewable subscription. Apple documents subscriptionGroupIdentifier as nil in that case (Apple docs).
  • The subscription's group data did not load, because the product request failed or came back partial.
  • Android has no member for this code. On Android, product discounts work differently.

Fix

How to fix productDiscountMissingSubscriptionGroupIdentifierError

  1. 01

    Only offer promotions on subscriptions

    Skip promotional offers for products that are not auto-renewable subscriptions.

  2. 02

    Check the group in App Store Connect

    Confirm the subscription belongs to a subscription group and that the group is set up for offers.

  3. 03

    Reload products

    Fetch offerings again and confirm the product loads with its group identifier before you request an offer.

  4. 04

    Use eligiblePromotionalOffers

    eligiblePromotionalOffers(forProduct:) handles the checks and returns only usable offers.

In your app

How to handle it in code

  • Do not retry the same call. The group ID will not appear by retrying.
  • Fall back to the regular price.
  • 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 == .productDiscountMissingSubscriptionGroupIdentifierError {
  // handle missing subscription group id
}

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

FAQ

productDiscountMissingSubscriptionGroupIdentifierError: questions people ask

What is a subscription group identifier?

The ID of the subscription group an auto-renewable subscription belongs to in App Store Connect. The SDK needs it to build a promotional offer signature.

Why does this error mention a discount?

Because it comes from the promotional offer flow, which starts from a product's discount. The real problem is the product, which has no subscription group.

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

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

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