The Google Play Billing subscription or one-time purchase product is not available for purchase for this user.
I integrate in_app_purchase library but I couldnt test it because I got item_not available error also I checked these steps :
Send an app with the Billing Library to your test track. This is a mandatory condition; at the same time, you can also test on debug builds with the same applicationId, but it is important that the app with the Billing Library is uploaded to the Play Console at least once.
Add Google accounts of testers to this test track, which is especially important for internal testing or closed alpha/beta. There will also be a link in the How testers join your test section, where the testers should accept the invitation.
You can buy only an activated product. After creating a product, there is an activate button in the Play Console. We described the process of creating a product in more detail in the first article.
Make sure that the testing on the device takes place from a tester’s Google account (which means that it must be enrolled as a tester in this test track and must have all the necessary technical access). This point seems to be obvious but things happen, and you also need to check this if you have received such an error.
The applicationId of the build which is used for purchase testing must completely match the applicationId from the Play Console. This is especially important for those who have a suffix added in their debug builds.
Add the email addresses of testers to the Setup → License Testing section in the left menu of the account (not the application), so that they buy products for free from a test card, not from a real one. Another advantage is that subscriptions in this case will have a test duration. It is not related to this error, but it is also useful knowledge.
but its still not working.
This issue was solved. "in-app-purchase" should be tested from an internal test. In additional I got these answers from Google Play Developer Support:
When publishing an open or closed app for the first time, it can take up to 24 hours for the opt-in to be available. For internal app, it can take up to 48 hours for the opt-in to be available.
The beginning of the link will be in the following format:
https://play.google.com/apps/testing/**** (open/closed track)