[Solved] Play Store IAP, Questions regarding Consumables and Product Receipts

I have a few questions regarding google play store purchases.

So if I want to allow my players to get permanent item once they made a consumable purchase, say they bought 400 gold and they will also receive a 100 additional permanent attack damage.

Is it okay to check product.receipt to know if the player’s account has made a consumable purchase before?

And if the player made a refund, will the product.receipt still exist on the player’s google play account?

@LandonC Consumable purchases by definition are not permanent, and can be purchased again. I would need to research your questions regarding the product.receipt which I would confirm by explicit testing. Have you tested this and perhaps seeing unexpected behavior?

Alright, I’ve checked, no receipt unless it is non-consumable.

For anyone who is searching for an answer, I used the code that I’ve found here to check if any existing product is already purchased. It works.

    public void OnInitialized(IStoreController controller, IExtensionProvider extensions) {
        Debug.Log("Initialized");
        this.controller = controller;
        this.extensions = extensions;
    
        foreach (Product p in controller.products.all) {
            //Non-consumables that have been purchased, should have the purchase info in the receipt.
            Debug.Log(p.receipt);
        }
    }