The operation could not be completed. (Error 2 in SKErrorDomain.) during subscription upgrade

I have a renewing monthly subscription in my app and recently added upgrade possibilities to yearly and 6 month subscriptions. Those new subscriptions were reviewed, approved and published to App Store.

I'm showing a modal for users in the app from where they can upgrade their subscription. Upgrading was tested with real devices on Sandbox and TestFlight. There has been successful purchases through the in app modal in production app, and directly upgrading from App Store.

However, for some users there seems to happen a failed transaction with paymentCancelled error code during the upgrade. The IAP is still successful, their subscription is upgraded and they haven't voluntarily canceled the IAP. The localized description of the error is "Toimintoa ei voitu suorittaa. (Virhe 2 kohteessa SKErrorDomain.)" which translates to "The operation could not be completed. (Error 2 in SKErrorDomain.)"

These users have various iPhones (iPhone 12 Pro, iPhone 14 Pro, iPhone 15 Pro, iPhone 16 Pro) with up to date iOS versions (>= 18.3.1).

I'm receiving DID_CHANGE_RENEWAL_PREF (UPGRADE) server notification of these purchases on my server.

I haven't been able to reproduce this error myself.

Any ideas why StoreKit might fail the transaction with paymentCancelled error but still successfully upgrade the subscription?

The operation could not be completed. (Error 2 in SKErrorDomain.) during subscription upgrade
 
 
Q