- 
                Notifications
    
You must be signed in to change notification settings  - Fork 396
 
Description
Describe the bug
Hello, I believe a bug in the Redemption Link behavior either the Swift SDK or in the web billing API. There’s a chance it’s expected behavior, but it’s slightly confusing.
When calling Purchases.shared.redeemWebPurchase(webPurchaseRedemption) on the same redemption link twice with two different accounts,I expect that a WebPurchaseRedemptionResult.purchaseBelongsToOtherUser result to be returned when trying to click the redemption link for the second time on a different account from the original redemption. The actual behavior is that a WebPurchaseRedemptionResult.expired() result is returned.
This was in the sandbox environment. Swift SDK version 5.39.0
Maybe this is intended behavior and is a convenient way for someone to be able to restore purchases when the user does something like deleting the app on their device and there's no remote authentication mechanism in place, but I would expect redeeming it doesn't "expire" it, but "revokes" it in a sense.
Platform
iOS
SDK version
5.39.0
SDK integration method
Swift Package Manager
StoreKit version
StoreKit 2 (default on versions >=5.0.0)
OS version
ios 18.6.2
Xcode version
16.1
Device and/or simulator
Device
Environment
Sandbox
How widespread is the issue
only tried on one or two devices
Debug logs
DEBUG: ℹ️ PostRedeemWebPurchaseOperation: Started
DEBUG: ℹ️ There are no requests currently running, starting request POST /v1/subscribers/redeem_purchase
DEBUG: ℹ️ API request started: POST '/v1/subscribers/redeem_purchase'
DEBUG: ℹ️ API request completed: POST '/v1/subscribers/redeem_purchase' (200)
DEBUG: ℹ️ Web purchase redeemed successfully.
DEBUG: ℹ️ Sending updated CustomerInfo to delegate.
DEBUG: ℹ️ PostRedeemWebPurchaseOperation: Finished
DEBUG: ℹ️ Detected active subscriptions changed. Clearing trial or intro eligibility cache.
DEBUG: ℹ️ PurchasedProductsFetcher: invalidating cache
DEBUG: ℹ️ Serial request done: POST /v1/subscribers/redeem_purchase, 0 requests left in the queueSteps to reproduce
- Go to my Web Payment Link (without attaching an id)
 - check out.
 - scan qr code to redeem in the app
 - It redeems as expected. The subscription is now tied to a custom app ID in my system.
 - Sign out of my account using Purchases.shared.logOut.
 - go to my email and click the link to try and redeem in a different account.
 - The api returns the “expired” result.
 - I check my email and see another link was sent.
 - I click the link and (signed into a different account) am granted the entitlement on the different account. The dashboard shows that a purchase transfers from the first user to the second.