Which PurchaseFailureReason is good to show

Hi guys!
I am currently fine-tuning my IAP and I have found out that it is behaving differently between iOS and Android.
For example, on Android i can see the failure in the OS IAP popup, but then my custom error with PurchaseFailureReason.Unknown is shown.

So, I’d like to ask you for some general recommendation, which PurchaseFailureReason values is good idea to present to the user inside the game and which ones to ignore and left the information to be displayed by the OS store.

Thank you!

That is up to you. But you shouldn’t be receiving an Unknown error, please test with a different phone, or a new product or a new user.

I am sorry, the question is poorly formulated. I’ve been asking for personal experiences or advice from users who implemented it before. Which results do they handle by their code or if they are leaving it on the underlying market completely. I am asking purely, because it does not look good when same error is shown twice.

As for the Unknown result, I’ve tested it on another phone with another product and still the same behaviour. It either succeeded or faild with Unknown reason. Did not tested all the results, but it does behave consistently for denied payment and pending transaction. User cancellation is working OK. For the deffered result, I can see unhandled NullReferenceException at UnityEngine.Purchasing.GooglePlayStoreExtensions.NotifyDeferredPurchase. Tested on Android 10 (Nokia 7+) and Android 11 (Nokia 8.3).

You need to address the Unknown error first. Naturally you would not present that message to a user. Generally you would never present any of the short error reasons to the user, you would present a friendly message instead. Please test with the Sample IAP Project here to compare, I do not see the error you mention. Also, make sure your products are defined on Google Play and you have no warnings on your Google Play console Sample IAP Project and Unity - Manual: Configuring for Google Play Store