I’m trying to create a new payment link in Stripe using the API connector. However, I have to add child parameters to the URL but I can’t figure out how to implement it.
According to the documentation of Stripe I need to add the line_items.price and line_items.quanitty as parameters to the URL. How can I add child parameters? I have tried about every combination of brackets, dots, etc but cannot get it working.
First of all, thanks for your reply. Unfortunately your solution does not work. When I try that I get the following API response.
When I try my original solution (so anything with line_items in it), the Stripe API provides a response like below in which it suggests to use the line_items parameter. Perhaps you have any other ideas?
So there’s a few ways to set up your API calls. I add my parameters to the body vs. the URL. It’s just a bit cleaner IMO.
Here’s a snapshot of the parameters (body) for an API call to the ‘Create Checkout Session’ endpoint. I know it’s a different endpoint, but the formatting is the same for the child parameters.
What you will probably need to do is put those parameters into the body and make sure they are formatted correctly … but the catch (if my old man foggy brain is correct) is you need to say it is JSON but don’t format it as JSON.
Give me a little bit to dig out something … I haven’t touched Bubble for a month
I think the saving grace is that they are consistent, at least in my experience.
I wish I could say that about several other API providers. I’ve worked with some that make it up as they go along which is most likely due to a bunch of different people working on different parts but too scared to talk to each other. Here’s looking at you ActiveCampaign
Josh @ Support Dept
Helping no-code founders get unstuck fast save hours, & ship faster with an expert on-demand
lineitems is an array. Assuming you only have one line item (otherwise you won’t be able to do it in the URL parameters if you have x line items) then you need to specify which lineitem in the array you are referring to.
Hence the lineitems[0]currency - which points at the first (and only) line item.