Code
28
SDK error · code 28
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.product
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
getPromotionalOffer(forProductDiscount:product:) was called with a product whose subscriptionGroupIdentifier is nil (PurchasesOrchestrator.swift).subscriptionGroupIdentifier as nil in that case (Apple docs).Fix
Skip promotional offers for products that are not auto-renewable subscriptions.
Confirm the subscription belongs to a subscription group and that the group is set up for offers.
Fetch offerings again and confirm the product loads with its group identifier before you request an offer.
eligiblePromotionalOffers(forProduct:) handles the checks and returns only usable offers.
In your app
// 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
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.
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.
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
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