SDK error · code 7

receiptAlreadyInUseError (error code 7): Receipt already in use

What it means

receiptAlreadyInUseError (code 7) means the purchase already belongs to another app user, and your project's restore setting does not allow moving it. The server answered backend code 7102. Ask the customer to sign in with the account that bought, or change the project's transfer behavior to transfer if purchases should follow the person who restores.

Code

7

iOS (Swift)

ErrorCode.receiptAlreadyInUseError

Android (Kotlin)

PurchasesErrorCode.ReceiptAlreadyInUseError

Causes

Why the SDK returns receiptAlreadyInUseError

  • The backend answered 7102 (cannot transfer purchase), and the SDK maps it to receiptAlreadyInUseError (BackendErrorCode.swift, errors.kt).
  • A customer restored or re-posted a store purchase while signed in as a different app user than the one who bought it.
  • The project's restore behavior forbids moving the purchase. RevenueCat documents the options in its restore behavior docs.
  • A shared device or a reinstall with a new app user ID after logging out, so the old account still owns the purchase.
Backend codeMeaning
7102Cannot transfer purchase: another subscriber owns the receipt and the project's restore behavior does not allow a transfer.

Fix

How to fix receiptAlreadyInUseError

  1. 01

    Find the current owner

    Open the customer in the dashboard, or call GET /v1/subscribers/{app_user_id} for the suspected owner, and check which app user ID holds the subscription.

  2. 02

    Sign in with the buying account

    Tell the customer which account bought the product and ask them to log in with it. Then entitlements appear without a restore.

  3. 03

    Pick the right transfer behavior

    Set the project's transfer_behavior: transfer moves purchases to whoever restores, transfer_if_no_active moves them only when the owner has no active subscription, keep always refuses, and share merges both users. See how to restore purchases.

  4. 04

    Use one app user ID per person

    Call logIn with your own stable user ID so a person's purchases stay on one customer across devices.

In your app

How to handle it in code

  • Do not retry. The same request fails the same way until the setting or the account changes.
  • Tell the customer the purchase is linked to another account and show how to sign in with it. Do not say whose account it is.
  • Do not grant access from the error. Grant it only when customer info shows the entitlement active.
  • Log it with the app user ID, because a spike usually means shared devices or a missing login step.
Match the errorSwift · Kotlin
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .receiptAlreadyInUseError {
  // handle receipt already in use
}

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

On RevenueDot: On POST /v1/receipts, RevenueDot answers HTTP 400 with code 7102 when another known user owns the purchase and the project's transfer_behavior is keep, or transfer_if_no_active while the owner still has an active subscription. The default transfer moves the purchase and sends a TRANSFER webhook. An anonymous owner is always merged into the user who restores. Sandbox purchases can use sandbox_transfer_behavior instead.

FAQ

receiptAlreadyInUseError: questions people ask

What is RevenueCat error 7102?

Backend code 7102 means the purchase cannot be transferred because another subscriber owns it. The SDK reports it as receiptAlreadyInUseError (code 7). The project's transfer behavior decides whether a restore can move the purchase.

How do I fix receiptAlreadyInUseError?

Ask the customer to sign in with the account that bought, or change the project's transfer behavior to transfer so a restore moves the purchase to the current user. Then restore again.

Is receiptAlreadyInUseError the same as receiptInUseByOtherSubscriberError?

No. The current SDKs raise receiptAlreadyInUseError (code 7) for backend code 7102. receiptInUseByOtherSubscriberError (code 13) exists in the enum but no mapping in the native SDKs sends the backend's answer there.

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

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

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