Help with Consumable IAP and Quantity Selection in Thunkable

Hi, I just created an app with in-app purchase products on Android, and I am using the “Buy in app purchase package” block.

I have successfully set up the connection with RevenueCat and can retrieve both the offerings and package details. However, I would like to ask for clarification regarding the structure of the purchase object returned by the “Buy in app purchase package” block.

Specifically, I want to parse the quantity of the product in that purchase. Could someone please clarify:

  1. What fields are included in the purchase object?
  2. How can I access the quantity of the product purchased?

Any guidance or examples would be greatly appreciated!

Thank you!

Hi caokyhieu253txrg6o, welcome to Thunkable! :tada:

Be sure to check out How to ask Great Questions v2.0, the Community Guidelines, and our Getting Started Guide to make the best of your Thunkable Community experience!

You will need to use these combinations of block. The offerings block will give you all available items for purchase and stored within the offerings object. All items will be put into a list under “availablePackages”. From there, you need to identify the index of the list of products you want.

Upon a successful purchase, the green purchase block will contain information similar to the ones in “Customer Info”. It will contain information on all the items purchased. If you want to access the quantity of the product purchased, it will depend on what kind of product it is. I would look into the example JSON for the part of the object that would be most useful for you. I would default to allPurchasedProductldentifiers or allPurchaseDates.