dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.81k stars 641 forks source link

How can we track user subscription with purchaseUpdatedListener #2733

Open OpenTasteSG opened 4 months ago

OpenTasteSG commented 4 months ago

Question 1: If we have a subscription that is auto renew monthly, from what I understand, every month, the app will trigger purchaseUpdatedListener when the subscription is renewed?

If a user uses multiple accounts on the app, how to we know the purchase returned belong to which account that user purchased?

eg. User login account A. Buy a monthly subscription. Logged out and use account B. When the account A subscription is renewed, will the even purchasedUpdatedListener be triggered when logged in as account B on the app on the same device?

Question 2: If we do not call finishTransaction, will the user still get charged or the subscription will get voided? eg. User never used the app for quite a while, but the subscription is not cancelled, so the purchaseUpdatedListener will not get triggered since the app not started, or the event will still run in background?