Code
13
SDK error · code 13
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.receipt
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
Fix
In a switch on the error code, put receiptAlreadyInUseError and receiptInUseByOtherSubscriberError in the same branch.
Check which app user ID holds the purchase in the dashboard or with GET /v1/subscribers/{app_user_id}.
Tell the customer to sign in with the account that bought the product. Entitlements then appear without a restore.
If purchases should follow whoever restores, set the project's transfer_behavior to transfer. See how to restore purchases.
In your app
// 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
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.
The Android SDK's PurchasesErrorCode has no member for it. Android reports a purchase that belongs to another user as ReceiptAlreadyInUseError (code 7).
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
Building and testing are free, and you can test your first purchase before you have a store account. Pro costs $0 until your apps make $10,000 a month.
Already have an account? Sign in · Switching from RevenueCat? Change one line