I have been facing an issue when trying to pass in array type parameter in a query to Stripe Resource. For example, when I query GET /v1/prices endpoint, I pass lookup_keys parameter, which must be an array of Strings. However, when I do so using the Stripe resource, I get an invalid_array error in response from Stripe API. The Stripe resource parses the parameters and builds the URL like this:
To pass an array parameter to the Stripe API using the Retool Stripe resource, you can follow these steps:
In your query, set the lookup_keys parameter to a JavaScript array of strings, like this:
['lookup_key1', 'lookup_key2']
Enable the "Evaluate query params" option in the Stripe resource settings. This will ensure that the array is properly serialized before sending the request to the Stripe API.
By enabling "Evaluate query params", Retool will correctly format the lookup_keys parameter as an array in the URL, like this:
Thank you for your response. However I cannot find any option named "Evaluate query params" in Stripe resource settings.
Without it, Stripe resource still parses the array incorrectly. However this only happens in GET requests. I have discovered that POST requests are not affected by this, as the array parameter is in the body.