SDK error · code 13

receiptInUseByOtherSubscriberError (error code 13): Receipt in use by another subscriber

What it means

receiptInUseByOtherSubscriberError (code 13) is defined for a receipt that another subscriber uses, but the current native SDKs do not raise it. A purchase that belongs to another user arrives as receiptAlreadyInUseError (code 7), from backend code 7102. Handle both codes the same way: ask the customer to sign in with the account that bought.

Code

13

iOS (Swift)

ErrorCode.receiptInUseByOtherSubscriberError

Android (Kotlin)

No matching code in the Android SDK; see the causes below.

Causes

Why the SDK returns receiptInUseByOtherSubscriberError

  • The code exists in the iOS enum, with the description "The receipt is in use by another subscriber", and in the React Native and Flutter enums (ErrorCode.swift).
  • The backend-to-SDK mapping sends code 7102 to receiptAlreadyInUseError, not to this code (BackendErrorCode.swift). Nothing else in the iOS source raises code 13.
  • The Android SDK enum has no member for code 13, so Android never reports it (PurchasesErrorCode.kt).
  • An older SDK version or a wrapper that predates the mapping to code 7 may still raise it.

Fix

How to fix receiptInUseByOtherSubscriberError

  1. 01

    Handle codes 7 and 13 together

    In a switch on the error code, put receiptAlreadyInUseError and receiptInUseByOtherSubscriberError in the same branch.

  2. 02

    Find the owner

    Check which app user ID holds the purchase in the dashboard or with GET /v1/subscribers/{app_user_id}.

  3. 03

    Ask for the buying account

    Tell the customer to sign in with the account that bought the product. Entitlements then appear without a restore.

  4. 04

    Change the transfer behavior if needed

    If purchases should follow whoever restores, set the project's transfer_behavior to transfer. See how to restore purchases.

In your app

How to handle it in code

  • Do not retry. The result stays the same until the account or the transfer setting changes.
  • Tell the customer the purchase is linked to another account, without naming whose.
  • Do not grant access from the error.
Match the errorSwift
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .receiptInUseByOtherSubscriberError {
  // handle receipt in use by another subscriber
}

On RevenueDot: RevenueDot answers backend code 7102 when another known user owns a purchase and the project's transfer behavior forbids moving it. The SDK reports that as receiptAlreadyInUseError (code 7), not as code 13. See receiptAlreadyInUseError.

FAQ

receiptInUseByOtherSubscriberError: questions people ask

What is the difference between receiptAlreadyInUseError and receiptInUseByOtherSubscriberError?

receiptAlreadyInUseError (code 7) is the one the SDKs raise for backend code 7102. receiptInUseByOtherSubscriberError (code 13) exists in the enum, but the native SDK source has no path that raises it. Treat them alike.

Why is there no Android constant for code 13?

The Android SDK's PurchasesErrorCode has no member for it. Android reports a purchase that belongs to another user as ReceiptAlreadyInUseError (code 7).

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

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

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