Problem with IAP "Purchasing Unavailable "

So the IAP works with no problem in unity editor.
but when I try it on my mobile, it can’t Initialize Purchasing, so it goes to this function


and the error reason is "
Purchasing Unavailable
"

I already uploaded the apk as an alpha version in google play, and I have put my email as a tester.
and I added a Managed product and used its id in the IAP script

4364290--395134--upload_2019-3-27_15-10-1.png

The unity version that I’m using is 2018.3.5f1
4364290--395137--upload_2019-3-27_15-11-9.png

Please provide the device logs How To - Capturing Device Logs on Android

Here is the log file @JeffDUnity3D

4366606–395521–log.txt (8.92 KB)

Thank you for providing. Did you download the APK as the tester from Google Play? You need to do this first, and then subsequently you can side load. Can you confirm that you have performed all the steps here? Unity - Manual: Configuring for Google Play Store . Also, compare to the Sample project here Sample IAP Project

Thank you @JeffDUnity3D for your help, the problem was from the region,
google play IAP don’t support my region so when I used VPN It did work.
I don’t know if there’s a solution for the region. but I don’t think so.
Thank you again :slight_smile:

@JeffDUnity3D

I USED → CODELESS IAP

hello i am facing the same problem , my IAP button does not work
i have followed this link :-Unity - Manual: Codeless IAP
i have done all the step shown in this link and some that are not shown in this link like


  1. i imported iap plugin and fill in the google play key it needed
  2. i have created IAP catalog and buttons perfectly and linked it with the script storeHandler (handle when onPurchaseComplete and failed)
  3. then i exported google CSV file , and then i exported the project as .aab(<-playstore file not apk)
  4. then i uploaded csv and .aab file to my google play console as an internal test (alpha test ) and register my email as a tester in google
  5. after google publish my game , i downloded it from the link it generated for internal tester and there i see a failure reson → PURCHASEING UNAVAILABLE

please tell me what am i missing?

Please compare to the sample project on the forum, and be sure to follow the steps listed. Make sure you don’t use your developer account email as your tester email, you need a separate email account. Also please capture the device logs and post here https://discussions.unity.com/t/700293 and https://docs.unity3d.com/Manual/UnityIAPGoogleConfiguration.html and https://discussions.unity.com/t/699654

What happens if your tester account is the same email as your developer account?

Why do you ask? Is your tester account the same as your developer account, and purchases are failing?

I had my Google developer account as one of the testers. And yes I was having issues, but it turns out it was because I hadn’t initialised Unity Game Services yet. I don’t know when this became a thing, but I had numerous PurchasingNotAvailable errors lately.

I removed my developer account as a tester, yet any purchase made on my developer account, is still seen as a test card.

Initialization of Unity Game Services should have no impact here. It has no effect on IAP behavior, only IAP reporting in your Unity dashboard (we can’t send transaction events)

The warning message in the editor says…

Unity IAP: Unity In-App Purchasing requires Unity Gaming Services to have been initialized before use.

May want to clarify that wording.

Understood, but it’s just a warning, referring to the dashboard reporting dependency