Skip to main content

Hi,

trying to make use of RevenueCat but I won’t get it to work on Android but only iOS.

I am getting when trying to purchase a product on a simulator and on my Android device with:

try {
       await Purchases.purchaseProduct('test_4weeks_4_extend');
      } catch (e) {
         print(e);
     }

D/Purchases] - DEBUG(11123): ℹ️ Requesting products from the store with identifiers: test_4weeks_4_extend
D/ePurchases] - DEBUG(11123): ℹ️ Products request finished for test_4weeks_4_extend
I/flutter (11123): PlatformException(5, The product is not available for purchase., {code: 5, message: The product is not available for purchase., readableErrorCode: ProductNotAvailableForPurchaseError, readable_error_code: ProductNotAvailableForPurchaseError, underlyingErrorMessage: Couldn't find product.}, null)

I have followed the complete setup and created the keys and they are successfully on the platform and also connection to Google is working for Developer Connection.

The identifiers are matching the same on Play Store as well as on RevenueCat.

The products are activated on the PlayStore.

My app is on Closed testing and my Google Account is assigned as tester and in license testing.

For me it looks like RevenueCat does not find the product on the PlayStore but I don’t see any way to check that RevenueCat is able to fetch those products.

Any idea?

Thanks

 

Hi all - for errors such as `Product not available for purchase` or `Could not find product`, these are most likely still related to configuration errors. This guide is helpful: https://rev.cat/why-are-offerings-empty

For iOS, make sure to check that all tax forms, bank information, and Paid Application Agreements are signed and are not expired. Make sure that products are in a “Ready to Submit” or “Approved” state.

For Android, make sure that all tax forms and bank information are signed and unexpired. Make sure that your products are “Active”, your closed test track is published and approved by Google, and you are using a user who has been added as a licensed test user to your test track and has opted in. 


I have done all the configuration on both appstore connect and revenue cart and I am still getting this error message when I try to make a purchase: 

 

flutter: Revenue purchase error with beginners_course_7000 PlatformException(5, Couldn't find product., {underlyingErrorMessage: , code: 5, userCancelled: false, message: Couldn't find product.}, null)

 

And here is a snippet of my code: 

if (Platform.isIOS) {      try {         // CustomerInfo customerInfo = await Purchases.purchaseProduct(productID);        print("Product id in code $productID");        await Purchases.purchaseProduct(productID);        // User now owns this entitlement           FirestoreService().addEnrolledCourse(               userId: userId, courseId: courseId);           Get.to(() => const PaymentSuccessful());      } catch(e) {          debugPrint("Revenue purchase error with $productID $e");      } 

Idk what I am doing wrong, can anyone help me with this?


 

Hello Team,
I am trying to purchase product on android. I double check each and everything.

1. I added build on internal testing.
2. I added my self in internal testing.
3. In-App product all product status is active.
4. In revenue cat product's status code is OK.
5. In revenue I created offering..
6. I also checked both play store and revenue cat product ID is matched

I am using code

// getting product await Purchases.configure({ apiKey: APIKeys.google });
const offerings = await Purchases.getOfferings();
setCurrentOffering(offerings.current);

//Purchasing product
const data = await Purchases.purchaseStoreProduct(pkg.product);

This error I am getting below error everything every time.

Purchase error: {"nativeStackAndroid"::],"userInfo":{"userCancelled":false,"code":5,"underlyingErrorMessage":"Error updating purchases. DebugMessage: . ErrorCode: ITEM_UNAVAILABLE.","readableErrorCode":"ProductNotAvailableForPurchaseError","readable_error_code":"ProductNotAvailableForPurchaseError","message":"The product is not available for purchase."},"message":"The product is not available for purchase.","code":"5","userCancelled":false}


Looks like await Purchases.purchaseProduct('identifier') does not work on Android but iOS.

You need to create a package on RevenueCat and assign the products and then go for await Purchases.purchasePackage(package) and it works.

A bit strange but it works now.

Happy Holidays!


Did everything from scratch today and following each step with the same result.

Any advise would be appreciated.

 

Thanks


Reply