Product does not have receipt for Non Consumable in Unity on Android

I’m able to make a purchase successfully on an Android phone using Unity IAP and I can see the receipt.

But some time later the receipt is gone and the

product.availableToPurchase is true (this is a non consumable and should be false)

and

product.hasReceipt is false

Seems like it’s getting consumed…

When the app is opened I check to see if the product is available to purchase as follows

public Product GetProduct(string productID)
       {
           Product product = m_StoreController.products.WithID(productID);    
           return product;
       }

If this product has been purchased before and has NOT been consumed, shouldn’t

product.availableToPurchase be false and product.hasReceipt be true?

Any help would be appreciated.

What version of IAP? What happens when you reinstall the app? All previously purchased non-consumables should be restored during a reinstall and you should see ProcessPurchase fire. Put Debug.Log statements in there and provide the device logs. Also, what happens when you try to purchase again? You should get a duplicate purchase error.

Using version

[1.23.4] - 2020-07-13

Reinstalling the app did not change it.

I did not make a purchase but the screen to make a purchase does show up.

I’m using the Purchaser example… If this is not the way to check for previous purchases, then how can I check without saving purchase data on my server?

Sorry, what do you mean did not change it? I wasn’t asking for any changes. My question, did it restore? Did you get a ProcessPurchase callback? What happens when you try to Purchase again? These are troubleshooting steps only, they are not expected to solve your issue. Please show your Debug.Log statements in the device logs to confirm. Sorry I don’t know what the “Purchaser example” is. How To - Capturing Device Logs on Android But to your point, we have had recent reports of consumption of non-consumables. I want to confirm your situation, but need this information first. I would recommend that you compare to the Sample IAP Project here Sample IAP Project

I was able to purchase the same item again.

Please test with a subscription (a true Google non-consumable).

I could try that but even if it works for that it doesn’t meet our business requirement. We still need to use a non consumable

I was able to do it with the IAB with getAllOwnedSkus.

So getting previously owned products… Is this possible with IAP? If yes, please point me in the right direction.

These are only troubleshooting steps. Please keep me posted on the requested information. To your question, you would check as you are, product.hasReceipt should be true

If I wanted to keep track of this purchase on the server across multiple devices and the same device, how can I uniquely identify the purchaser without registration?

Just out of curiosity… How am I allowed to purchase the same non consumable product multiple times without consuming it…

That’s why I wanted you to test with a subscription. You shouldn’t be able to.

You don’t need to. Non-consumables would be expected to Restore automatically across all devices that belong the user. ProcessPurchase would auto-trigger on IAP initialization just as if it was a new purchase.