I’ve tried to replace the API with Pipe and it called successfully and returned a JSON that I can format successfully. I have tried many ways, remove the /n in the JSON Body, remove the space it still returns the same error.
If you want to continue to use JSON at first because it’s easier to encode, you can use this plugin to convert the json to something that Stripe accept
Use the plugin… you could do it dynamicwlly even if this is querystring but adding numbering to array item is very complex. Using the plugin you encode it as json and it will do the numbering for you
You do the encoding directly in the plugin not in API connector. The result in the plugin will go in the api connector. I’m on mobile, but will try to post a screenshot later
I actually found a solution to this that doesn’t involve any plugin at all !
What i found is that Stripe only accepts application/x-www-form-urlencoded requests, which actually means that the information should in fine be in the URL of the request.
To do this, you can construct a datatype that contains the line_items informations, for example a stripe_cart datatype that has an array field of datatype stripe_line_items. And a stripe_line_items has an ID price text field, and an index integer field (representing the 0 and 1 in the url above). If needed you can add a quantity field as well to represent x and y.
Then you need to configure your API call as follows :