I’m building a hybrid app using Capacitor + React, with Cordova plugins handling in-app purchases (specifically cordova-plugin-purchase).
My app allows multiple app-level user accounts on the same device. A purchase flow looks like this:
User logs into app account A
User purchases a consumable IAP
Store purchase succeeds (Apple / Google)
App fails to reach backend (e.g., network loss) before associating the transaction with the app user
On next launch, the user logs into a different app account (B)
The store replays the unfinished transaction
On native platforms:
iOS StoreKit 2 supports appAccountToken
Google Play Billing supports obfuscatedAccountId
However, I don’t see a way to set or retrieve these values via Cordova plugins.
Questions
- Is there any supported way in Cordova to bind a store transaction to an app user account at purchase time?
I’m trying to understand whether Cordova offers a first-class solution here, or whether this is an inherent limitation of the abstraction layer.