Check out example codes for "unity product.hasreceipt". It will help you in understanding the concepts better.

Code Example 1

Product product = storeController.products.WithID(productId);
if (product != null && product.hasReceipt)
    // Owned Non Consumables and Subscriptions should always have receipts.
    // So here the Non Consumable product has already been bought.
    itemBought = true;

Learn ReactJs, React Native from