Get data from subscriptionOfferDetails query with InApp Billing. Manage the response

Hello everyone.
I’m triying that my app shows the price of subscription in every country, with its own price and currency.
It is possible to query subscriptionOfferDetails with inAppBilling and get the response with this block:
imagen
This response seems to contain two json and some extra information, but I’m not sure about the structure of this data. This is the whole txt file obtained:
[ProductDetails{jsonString.txt (1.5 KB)
This is the first json:
json1.txt (779 Bytes)
And this is the second:
json1.txt (779 Bytes)

And this is the extra information:
extra.txt (265 Bytes)

I guess all is part of a unique json or list that can be managed, but I don’t know how.

I need the value formattedPrice and using only the first json I can get it by using these blocks:


but I guess it is not a reliable way to get that value and it is quite difficult to do tests because inApp Billing can’t be tested in companion.
I would appreciate any help in this matter.
(Please @Still-learning do your magic)

Thanks in advance.

EDIT: I tried several times to upload the second json, even changing its folder in computer and changing its name but it remains as json1.txt.

2 Likes

The response text starts with ["ProductDetails not ["ProductDetails (my fault) but your solution works perfect!
Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.