Solved

[Android] "The product is not available for purchase"

  • 5 January 2022
  • 4 replies
  • 179 views

Badge +2

Sorry for asking this question here, but we haven’t had much luck over the SDK forum. 

We are still getting the “The product is not available for purchase” when attempting to subscribe on Android when using the React Native package. Initially I suspected there may be some kind of latency associated with the setup, but that doesn’t appear to be the case. 

Here’s a list of what we’ve checked and the current set up:

  1. The app is publicly rolled out on a production track
  2. The package name in RevenueCat matches that in our Gradle build
  3. The product identifiers match those in Google Play Console
  4. The subscriptions are active in Google Play Console

Set up on the Google side of things seems to be fine, as the Play Store listing is correctly pulling in our subscription packages. Here are screenshots to confirm the above:

Subscriptions in GPC showing as active
App is available and rolled out in production
Play Store listing clearly recognises IAPs
Identifiers in RevenueCat match those in the Play Console
Package name matches in Play Console

Does anyone have any suggestions of what we may try? This is extremely frustrating as the iOS version works flawlessly, and according to all of the RevenueCat documentation, this should be working on Android too!

icon

Best answer by Kolekto 6 January 2022, 00:55

View original

4 replies

I am having the same issue with Android right now. Any help would be appreciated

Badge +2

So, I finally figured out the problem. Basically, you have to pass Purchases.PURCHASE_TYPE.SUB as the last param to `purchaseProduct`, here’s what the final signature looks like:

const { purchaserInfo, productIdentifier } = await Purchases.purchaseProduct(
plan,
null,
Purchases.PURCHASE_TYPE.SUBS
);

 

So, I finally figured out the problem. Basically, you have to pass Purchases.PURCHASE_TYPE.SUB as the last param to `purchaseProduct`, here’s what the final signature looks like:

const { purchaserInfo, productIdentifier } = await Purchases.purchaseProduct(
plan,
null,
Purchases.PURCHASE_TYPE.SUBS
);

 

Thank you for sharing! You’ve just saved me some time. Hope I can repay you someday :)

I have the exact same issue but not in production, I'm still in testing.

I’m using Flutter so the above answer doesn't help, unfortunately.

Does anyone know how to handle this in Flutter?

Reply