I’m desperately trying to create a Stripe API call using the Bubble API Connector plugin to establish a Checkout session. My problem is that I need to provide an array of objects in the body, which seemingly leaves me with no choice but to use the ‘Body raw’ field. This wouldn’t be an issue if it worked, but it doesn’t. For reasons I can’t fathom, the data I enter in the field doesn’t seem to be taken into account at all, according to the API response I receive.
Here are screenshots of the API call configurations I tried:
Try #1:
I also tried the following configuration, and as you can see from the corresponding response, it seems that only the parameters defined outside of the ‘Body’ field are considered:
I’m aware of the official Stripe Bubble plugin that provides an action to create a Stripe Customer session. However, it seems to handle sessions using the User data type rather than directly using Stripe customer IDs. For my needs, where I want the customer ID not to be attached to a User, this doesn’t seem suitable.
Any help would be greatly appreciated.
Thank you in advance to anyone who can take the time to look into this issue.
You are sending a json payload but your content type is form encoded url. It doesn’t work. Use parameters instead of body. However, take time to look on the forum about how to use API connector with stripe. There’s already a lot of topics about that
If I understand correctly, you’re saying that my payload isn’t considered because my header’s ‘content-type’ is set to ‘application/x-www-form-urlencoded’, correct? Unfortunately, I must use this content-type as it is a requirement from Stripe’s API.
Regarding your recommendation:
Use parameters instead of body
I would gladly follow this advice, but I need to send data that includes an array of objects, which, as far as I know, isn’t feasible with parameters. Below is the array that I need to provide:
Like I said, this question have been answered a lot of times on the forum. There’s multiple solution. I prefer to use a plugin to convert the jsonto serialized url. But there’s more solution than that.
Ex: