Code
18
SDK error · code 18
What it means
ineligibleError (code 18) means the customer cannot get this action, usually a subscription offer: StoreKit says they are not eligible, the backend answered 7232, or a promotional offer needs a purchase history they do not have. Check eligibility before you show an offer, fall back to the regular price, and do not retry.
Code
18
iOS (Swift)
ErrorCode.ineligible
Android (Kotlin)
PurchasesErrorCode.Ineligible
Causes
SKError.ineligibleForOffer, the user is not eligible for the subscription offer (source).Product.PurchaseError.ineligibleForOffer, the user is not eligible for the offer.| Backend code | Meaning |
|---|---|
| 7232 | User ineligible for the promotional offer. |
Fix
Use checkTrialOrIntroDiscountEligibility for intro offers and eligiblePromotionalOffers(forProduct:) for promotional offers before you show the offer.
Show the regular package when the customer is not eligible, instead of failing at checkout.
Apple reports eligibility for an introductory offer across the whole subscription group, not per product (Apple docs). Check the offer setup in App Store Connect or Play Console.
Use a new sandbox or test account to see the eligible path, because an account that used the offer before is no longer eligible.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .ineligibleError {
// handle ineligible for the offer
}
// Kotlin
if (error.code == PurchasesErrorCode.IneligibleError) { /* ... */ } On RevenueDot: RevenueDot does not answer 7232. It signs promotional offers with the app's In-App Purchase key and leaves the eligibility decision to Apple, which reports an ineligible customer on the device.
FAQ
Apple checks eligibility across the whole subscription group, so a customer who is not eligible for one product in the group is not eligible for the others (Apple docs). Call checkTrialOrIntroDiscountEligibility before you promise a trial.
The offer failed. The customer can still buy at the regular price. Show the base package instead.
In React Native, compare error.code with PURCHASES_ERROR_CODE.INELIGIBLE_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.ineligibleError.
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