SDK error · code 18

ineligibleError (error code 18): Ineligible for the offer

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.ineligibleError

Android (Kotlin)

PurchasesErrorCode.IneligibleError

Causes

Why the SDK returns ineligibleError

Backend codeMeaning
7232User ineligible for the promotional offer.

Fix

How to fix ineligibleError

  1. 01

    Check eligibility first

    Use checkTrialOrIntroDiscountEligibility for intro offers and eligiblePromotionalOffers(forProduct:) for promotional offers before you show the offer.

  2. 02

    Fall back to the base price

    Show the regular package when the customer is not eligible, instead of failing at checkout.

  3. 03

    Check the offer's rules in the store

    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.

  4. 04

    Test with a fresh account

    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

How to handle it in code

  • Do not retry. Eligibility does not change between attempts.
  • Show the regular price, or say "This offer is not available for your account".
  • Do not grant access, and do not apply the discount yourself.
Match the errorSwift · Kotlin
// 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

ineligibleError: questions people ask

Why is a customer ineligible for my introductory offer?

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.

Does ineligibleError mean the purchase failed?

The offer failed. The customer can still buy at the regular price. Show the base package instead.

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

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

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