Solved

[Android] The product is not available for purchase.

  • 8 September 2021
  • 8 replies
  • 4610 views

Badge +4

Please forgive my poor English.

I am currently using react native,
There is no purchase issue in the ios local test (Real device).
Currently, it is not possible to proceed with the payment with the following error message on android (Real device).

============================================================
DEBUG: ℹ️ Vending Offerings from cache
DEBUG: ℹ️ Checking if cache is stale AppInBackground false
DEBUG: ℹ️ Offerings cache is stale, updating from network in foreground
DEBUG: 😻 Offerings updated from network.
DEBUG: 💰 Purchase started - product:  com.revenuecat.purchases.models.ProductDetails@8d0ec795  - offering: standard
DEBUG: 💰 Purchasing product: beans_12
DEBUG: ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A0e02ff09c4ad4e249624e9c4056b9672/offerings
DEBUG: ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A0e02ff09c4ad4e249624e9c4056b9672/offerings 304
DEBUG: ℹ️ Requesting products from the store with identifiers: beans_12
DEBUG: ℹ️ Products request finished for beans_12
DEBUG: 💰 Retrieved skuDetailsList: 
DEBUG: ℹ️ Requesting products from the store with identifiers: beans_12
DEBUG: ℹ️ Products request finished for beans_12
DEBUG: 💰 Retrieved skuDetailsList: SkuDetails: {"productId":"beans_12","type":"inapp","title":"콩 12개 (com.pixelmonster.hihi (unreviewed))","name":"콩 12개","price":"₩3,900","price_amount_micros":3900000000,"price_currency_code":"KRW","description":"하이하이 앱에서 사용하는 재화","skuDetailsToken":"AEuhp4K__YthNbKzTlS2EcvWeAWuj8esDNxOC_rZ6i5P4HSGIvI0cudeWb9KcHzzBHUa"}
DEBUG: 💰 beans_12 - SkuDetails: {"productId":"beans_12","type":"inapp","title":"콩 12개 (com.pixelmonster.hihi (unreviewed))","name":"콩 12개","price":"₩3,900","price_amount_micros":3900000000,"price_currency_code":"KRW","description":"하이하이 앱에서 사용하는 재화","skuDetailsToken":"AEuhp4K__YthNbKzTlS2EcvWeAWuj8esDNxOC_rZ6i5P4HSGIvI0cudeWb9KcHzzBHUa"}
 Couldn't find purchase lists, trying to find single data.
 Received a bad purchase data.
 Couldn't find single purchase data as well.
ERROR: 🤖‼️ BillingWrapper purchases failed to update: DebugMessage: . ErrorCode: ITEM_UNAVAILABLE.null
ERROR: 🤖‼️ The product is not available for purchase.
 [Error: The product is not available for purchase.]
============================================================

I read the article below because it seems to be a similar issue.
https://community.revenuecat.com/general-questions-7/flutter-android-error-message-the-requested-item-is-not-available-for-purchase-145

However, the status of the app currently in closed test is [under review].
So I couldn't test everything in the above article.

 

Nevertheless, I have a few questions.

1. Can I test the purchase on my mac? [Android Real Device]

2. If I want to test purchases on my mac, do I have to do a closed test on the Google Play Console?

3. If closed testing is mandatory, does it have to be in release? (not in review)

4. Continuing from question 3, what is the relationship between closed testing and local testing? I don't understand this part.

icon

Best answer by tina 9 September 2021, 18:39

View original

8 replies

Userlevel 5
Badge +10

Hey @skkim!

  1. Yup, you’ll be able to test purchases when running the app through your Mac (e.g: through Android Studio). We recommend using a real device and not an emulator when testing purchasing. 
  2. If the closed track is still under review, you can also release it on an internal track. An internal track should be available immediately. Play Console Help article for reference: https://support.google.com/googleplay/android-developer/answer/9845334?hl=en 
  3. If you are using closed testing, it does have to be in release. You’ll know when the closed track is ready for testing when you see the green checkmark in the release. 

     

  4. The app has to be on a testing track in order for RevenueCat to communicate with the app store to fetch your products. 
Badge +4

Thank you for your reply.

 

The closed test has not changed to a release yet,
As you said, we went through an internal test.

 

The current status is as follows
As a result of local testing on an Android real device, the error message is the same.

 

It seems that the local payment test does not proceed as an internal test
I'm thinking of waiting for closed testing to change to a release.

 

Please let me know if there is a faster way to test it.

 

thank you.

Badge +4

After the internal test was changed to the published state, it was confirmed that the test works perfectly.

I don't understand Google's policy that tests should be conducted like this, but
It's been a big help.

thank you.

Badge +2

Hi, I am using Expo and managed to set everything up through iOS but on Android I am getting “Couldn’t find product”, “The product is not available for purchase” (code: 5)

I am getting the product when I do:

const offerings = await Purchases.getOfferings();

And I try to purchase through:

const { purchaserInfo } = await Purchases.purchaseProduct(product.identifier);

 

I have signed the APK and uploaded to Closed testing. 

Does anyone know what the issue could be?

Badge +2

Update: The issue was that 

const { purchaserInfo } = await Purchases.purchaseProduct(product.identifier);

had to be replaced with 

const { purchaserInfo } = await Purchases.purchasePackage(package);

because I had packages. 

Badge

Hello @Anes Neira , Could you please explain what’s the difference about packages and product ?

Badge +4

Hello @Anes Neira , Could you please explain what’s the difference about packages and product ?

 

After the internal test was changed to the published state, it was confirmed that the test works perfectly.

I don't understand Google's policy that tests should be conducted like this, but
It's been a big help.

thank you.

Hey you mentioned here internal test was changed. But I guess you might be pointing to closed test because i ran into the same problem in my internal test and the closed track is not yet reviewed.

Are there any suggestions?

Reply