Skip to main content
Solved

getProducts() does not return any products


Forum|alt.badge.img+1

I am completely lost on this one - posted already two times but somehow these posts are not showing up.

Since I am completely stuck, all I can to is try again:

 

I have already checked my setup multiple times and went through this guide (Why are offerings or products empty?) but I fail to see where I did my mistake.

Is there any way for me to trouble shoot this issue?

  • My staging environment has a released app which I installed via Google Play
  • All my products IDs (SKU) exist and are active
  • All SKUs are mirrored in RevenueCat 
    • The service account is happy
    • products show up as active
  • Bundle ID etc are fine - otherwise Firebase Authentication would not work either
  • Checked my API keys

I’ve checked with logcat but there’s nothing that would indicate an issue..

Completely lost here :/

Best answer by alejandra-wetsch

Hey ​@s-falk

Thank you for reaching out. I'll be happy to help here! 

After checking your configuration, I see that the products you're trying to fetch are Consumable products. In order to fetch those types of products through the getProducts method, apart from specifying the product identifiers to fetch, you need to set the type of product as NON_SUBSCRIPTION. Please check the SDK reference here, and the code snippet below for reference: 

const products = await Purchases.getProducts(
	['product1', 'product2'],
	PRODUCT_CATEGORY.NON_SUBSCRIPTION
);

This configuration is required on Android because the underlying BillingClient must know whether to query In App Purchases or Subscriptions; without it, the call returns an empty array. 

Once the product fetch is working, a recommended follow-up is to consider switching to Offerings Purchases.getOfferings(), which abstracts away platform quirks and lets you manage which SKUs are shown without code changes—but of course, only if this is accurate to your business model!

I hope this helps. Please let me know if you have any questions!

Best, 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

6 replies

alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+4

Hey ​@s-falk

Thank you for reaching out. I'll be happy to help here! 

After checking your configuration, I see that the products you're trying to fetch are Consumable products. In order to fetch those types of products through the getProducts method, apart from specifying the product identifiers to fetch, you need to set the type of product as NON_SUBSCRIPTION. Please check the SDK reference here, and the code snippet below for reference: 

const products = await Purchases.getProducts(
	['product1', 'product2'],
	PRODUCT_CATEGORY.NON_SUBSCRIPTION
);

This configuration is required on Android because the underlying BillingClient must know whether to query In App Purchases or Subscriptions; without it, the call returns an empty array. 

Once the product fetch is working, a recommended follow-up is to consider switching to Offerings Purchases.getOfferings(), which abstracts away platform quirks and lets you manage which SKUs are shown without code changes—but of course, only if this is accurate to your business model!

I hope this helps. Please let me know if you have any questions!

Best, 


Forum|alt.badge.img+1
  • Author
  • Member
  • 8 replies
  • July 17, 2025

Thanks a lot - this is likely the missing piece of the puzzle…

You mentioned that this would be necessary on Android - do I have to set something else here on iOS or will NON_SUBSCRIPTION work in both cases?

 


alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+4

Hey ​@s-falk

You’re more than welcome! 

That’s a good point, thank you for bringing it up! In the case of iOS, you do not need to set that parameter as Apple will resolve it by itself.


Forum|alt.badge.img+1
  • Author
  • Member
  • 8 replies
  • July 18, 2025

Hello and thank you!

So what I understood is that this parameter is basically ignored on iOS? For my needs, this should work on both environments:

const products_non_sub = await Purchases.getProducts(
  [productId],
  PRODUCT_CATEGORY.NON_SUBSCRIPTION,
);

This does not really become clear when reading the documentation:

type - Optional type of products to fetch, can be SUBSCRIPTION or NON_SUBSCRIPTION. SUBSCRIPTION by default

but to be fair: I also completely overlooked this parameter after relying on a chat-bot ..


alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+4

You're more than welcome, ​@s-falk ! 

Exactly. The parameter is ignored in iOS and only considered in Android. For better code clarity, I recommend leaving your implementation as your code snippet.

Thank you for your feedback regarding the documentation. We will update it so that it is clearer moving forward. 

Please let me know if you have any other questions!


Forum|alt.badge.img+1
  • Author
  • Member
  • 8 replies
  • July 25, 2025

All questions answered. Thank you! :) 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings