SDK error · code 8

invalidReceiptError (error code 8): Invalid receipt

What it means

invalidReceiptError (code 8) means the backend said the receipt or purchase token is not valid, usually as code 7103: the transaction does not verify, belongs to another bundle ID or package name, or is a local Xcode test receipt. The SDK then finishes the transaction for good. Check the app's bundle ID or package name and the store credentials on the server.

Code

8

iOS (Swift)

ErrorCode.invalidReceiptError

Android (Kotlin)

PurchasesErrorCode.InvalidReceiptError

Causes

Why the SDK returns invalidReceiptError

  • The backend answered 7103 (invalid receipt token) or, on iOS, 7712 (the purchased product is missing from the Apple receipt). Both map to invalidReceiptError (BackendErrorCode.swift).
  • The receipt was made by a build with a different bundle ID or package name than the app configured on the backend.
  • A StoreKit testing receipt signed by Xcode's local certificate, not by Apple, reached a backend that does not know that certificate (Apple: set up StoreKit testing).
  • A purchase token that Google Play says is invalid, or a cancelled pending purchase.
  • Android with Amazon: the SDK could not get the Amazon receipt data from the backend.
Backend codeMeaning
7103Invalid receipt token.
7712The purchased product is missing in the Apple receipt (iOS mapping).

Fix

How to fix invalidReceiptError

  1. 01

    Match the bundle ID or package name

    Compare the app's bundle_id or package_name on the backend with the build you test. A mismatch makes every receipt invalid.

  2. 02

    Add the Xcode certificate for local tests

    For StoreKit testing in Xcode, save the public certificate from your .storekit file and store it as the app's xcode_certificate credential. See test purchases without real money.

  3. 03

    Read the server message

    The 7103 message names the cause, for example a bundle ID mismatch or a malformed token. Read it in the SDK's underlying error or the server log.

  4. 04

    Check the store credentials

    Run the credential check on the app page. A wrong App Store key or Google service account is a setup problem on the server, not a bad receipt.

In your app

How to handle it in code

  • Do not retry. A 4xx answer tells the SDK the receipt can never be accepted, so it finishes the transaction.
  • Do not grant access from the error. Show "We could not verify your purchase" and point the customer to support.
  • Log the app user ID and the underlying message. For a paying customer, check the store's own record and grant access by hand if needed.
Match the errorSwift · Kotlin
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .invalidReceiptError {
  // handle invalid receipt
}

// Kotlin
if (error.code == PurchasesErrorCode.InvalidReceiptError) { /* ... */ }

On RevenueDot: RevenueDot answers HTTP 400 with code 7103 when the body has neither fetch_token nor app_transaction, when a StoreKit 2 transaction's signature or bundle ID does not verify, when Google says the purchase token is invalid or product_ids is missing for a one-time product, and when a Test Store token is malformed. Temporary store failures never answer 7103: they answer 5xx so the SDK retries. See 4xx or 5xx on a receipt.

FAQ

invalidReceiptError: questions people ask

What is RevenueCat error 7103?

Backend code 7103 means the receipt or purchase token is invalid. The SDK reports it as invalidReceiptError (code 8). Common causes are a wrong bundle ID or package name and an Xcode test receipt the backend cannot verify.

Why do StoreKit test purchases fail with an invalid receipt?

Xcode signs local test transactions with its own certificate, not Apple's, so a backend that has not been given that certificate rejects them. Add the public certificate to the app as xcode_certificate.

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

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

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