Code
41
SDK error · code 41
What it means
expiredWebPurchaseToken (code 41) means the redemption link for a web purchase has expired, reported as backend code 7853. A new link is sent to the email used to buy. The error carries an obfuscated email so you can say where it went. Show that hint, and ask the customer to open the new link.
Code
41
iOS (Swift)
ErrorCode.expired
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
expired result with the obfuscated email (WebPurchaseRedemptionHelper.swift).| Backend code | Meaning |
|---|---|
| 7853 | Expired web redemption token. The response also carries purchase_redemption_error_info.obfuscated_email. |
Fix
Read rc_obfuscated_email from the error's userInfo, or the expired result's email, and show "We sent a new link to j***@example.com".
Tell the customer to open the newest email and use that link.
If links expire too soon for your buyers, raise redemption_link_hours in the web config.
If the buyer lost access to the email, route them to support with their order details.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .expiredWebPurchaseToken {
// handle expired web purchase token
} On RevenueDot: RevenueDot answers HTTP 400 with code 7853 and purchase_redemption_error_info.obfuscated_email when the link is past redemption_link_hours (24 by default) or was replaced by a newer one. It emails a fresh link to the buyer, at most once an hour.
FAQ
Backend code 7853 means the web redemption link expired. The iOS SDK reports it as expiredWebPurchaseToken (code 41), with an obfuscated email, and the Android SDK as purchaseInvalidError.
On RevenueDot, yes. The server emails a fresh link to the buyer when someone opens an expired one, at most once an hour.
The React Native PURCHASES_ERROR_CODE enum in the SDK source has no member for it, so compare error.code with the string "41". In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.expiredWebPurchaseToken.
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