Code
6
SDK error · code 6
What it means
productAlreadyPurchasedError (code 6) means the customer already owns this product, so the store refused to sell it again. Restore purchases or refresh customer info to give them the entitlement they already paid for. On Google Play it is ITEM_ALREADY_OWNED, which can also be a stale cache or an unacknowledged purchase.
Code
6
iOS (Swift)
ErrorCode.product
Android (Kotlin)
PurchasesErrorCode.Product
Causes
unknown SKError whose underlying ASD error is 3532 (currently subscribed), which the SDK maps to productAlreadyPurchasedError (source).ITEM_ALREADY_OWNED. Google says it is usually permanent but can be a cache issue, and recommends querying purchases with queryPurchasesAsync() (Google docs).ALREADY_PURCHASED for the purchase request.| Backend code | Meaning |
|---|---|
| 7852 | Purchase belongs to another user. Android maps it to productAlreadyPurchasedError; iOS maps it to purchaseBelongsToOtherUser. |
Fix
Call getCustomerInfo and check the entitlement. If it is active, the customer already has access, so close the paywall.
If the entitlement is not active, call restorePurchases() so the SDK posts the owned purchase. See how to restore purchases.
A non-consumable that was never acknowledged, or a consumable that was never consumed, stays owned and blocks a second purchase. Let the SDK post the purchase, or finish it with Play.
Check the entitlement before you show a paywall, so owners never see a purchase button for a product they have.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .productAlreadyPurchasedError {
// handle product already purchased
}
// Kotlin
if (error.code == PurchasesErrorCode.ProductAlreadyPurchasedError) { /* ... */ } On RevenueDot: When a web purchase has already been redeemed by another app user, RevenueDot answers 7852. The iOS SDK reports that as purchaseBelongsToOtherUser (code 40) and the Android SDK as this error.
FAQ
Google Play says the customer already owns the product. It is usually permanent, but a stale purchase cache can cause it too, so query purchases again before you decide (Google docs).
Refresh customer info and call restorePurchases. The customer already owns the product, so the fix is to give them the access they paid for, not to sell it again.
In React Native, compare error.code with PURCHASES_ERROR_CODE.PRODUCT_ALREADY_PURCHASED_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.productAlreadyPurchasedError.
Get started
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