Query Product Details

This is an asynchronous function which allows you fetch Product Details from your defined products in Google Play Console. You can make use of this to create your own purchasing experiences for your players.
This will also return offer tokens which can optionally be used when Launching a Billing Flow for a specific subscription baseplan/offer.

The parameters include a list of product-ids (from the Google Play Console) and a Product Type.

Once the asynchronous operation has completed, one of two delegates will be called to handle the success and failure situations.

1

Product Ids

An array of Product ID's to fetch. These ID's can be sourced from the Google Play Console.

2

Product Type

Product Type can either be Subscription or InApp products.

3

On Success

A delegate that will be called when the Product Details have successfully been retrieved. The delegate will produce an Array of Product Details for you to use.
You can simply click and drag this pin to create a custom event.

4

On Failure

A delegate that will be called if there is an error querying product details. The delegate will produce a Billing Response Code and debug message for the developer to handle appropriately.
You can simply click and drag this pin to create a custom event.

Example

In the below example, we are querying INAPP products given a list of product IDs retrieved from the Google Play Console.
Depending on your use case, you can create your own functions to handle the results of product details and handling of errors.

When dealing with subscriptions with different base plans and offers, you may want to save the product details as a variable for use when Launching a Subscription Billing Flow.