React-native-iap: In what case should i store the receipt ?

Created on 20 Aug 2019  ·  5Comments  ·  Source: dooboolab/react-native-iap

Hi,

First of all thank you for this package, I just have a question regarding good practice with in app purchase, I used this package for one of my app and I did not store the receipt, the purchase only remove ads.

I just use RNIap.getPurchaseHistory() to restore purchase. I wanted to know if it's a good practice or am I doing really bad.

in what case storing receipt is recommended ?

thank you !

❓ question 🚶🏻 stale

Most helpful comment

How Do I differentiate users ? They are no authentification in my app, does the receipt have this info ?

You don't really need to differentiate, because the purchase history is tight to the user's Apple ID. So it's unique for each user.

You can connect users in your app to purchases by using the originalTransactionId per product/subscription. As a user can only have one originalTransactionId per product/subscription.

All 5 comments

You need to store your receipt in production to track the previous purchases (especially for your ios consumable products since this isn't stored anywhere in ios side). It also prevents fake purchases by validating it.

Ok ! Thank you @hyochan ! How Do I differentiate users ? They are no authentification in my app, does the receipt have this info ?

How Do I differentiate users ? They are no authentification in my app, does the receipt have this info ?

You don't really need to differentiate, because the purchase history is tight to the user's Apple ID. So it's unique for each user.

You can connect users in your app to purchases by using the originalTransactionId per product/subscription. As a user can only have one originalTransactionId per product/subscription.

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings