Code
15
SDK error · code 15
What it means
operationAlreadyInProgressForProductError (code 15) means a purchase for the same product is already running, so the SDK refuses the second call. A double tap on the buy button is the usual cause. Disable the button until the first purchase finishes, and wait for its callback. On Android the enum name is OperationAlreadyInProgressError.
Code
15
iOS (Swift)
ErrorCode.operation
Android (Kotlin)
PurchasesErrorCode.Operation
Causes
purchase for the same product before the first finishes gets this error (PurchasesOrchestrator.swift).| Backend code | Meaning |
|---|---|
| 7638 | Request already in progress. |
| 7629 | Subscriber attributes are being updated. |
Fix
Set a loading state when the customer taps buy, and clear it in the completion callback. That also stops accidental double charges in the UI.
Do not start a second purchase for the same product, from a paywall and a banner for example, before the first one returns.
A paywall that rebuilds itself while a purchase is open can fire the call twice. Keep purchase state outside the view.
If the cause is a backend 7638, wait a moment and try again.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .operationAlreadyInProgressForProductError {
// handle operation already in progress
}
// Kotlin
if (error.code == PurchasesErrorCode.OperationAlreadyInProgressError) { /* ... */ } On RevenueDot: RevenueDot does not answer 7638 or 7629. This error comes from the SDK itself, before any request reaches the server.
FAQ
A purchase for the same product is still running. The usual cause is a double tap or a paywall that calls purchase twice. Disable the button until the first call returns.
Yes. The Android enum member is OperationAlreadyInProgressError with code 15. It fires when a purchase callback is already waiting.
In React Native, compare error.code with PURCHASES_ERROR_CODE.OPERATION_ALREADY_IN_PROGRESS_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.operationAlreadyInProgressError. The Flutter and React Native names drop the "ForProduct" part.
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