API Connector Stripe invalid request

HI all,

I am trying to do a custom subscription for multiple quantities through Stripe. I am using API connector but i am not able to get it to work. Anyone knows why?

I keep getting this error. (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at https://support.stripe.com/)

I can get the API to work in postman, so it’s definitely a Bubble side error. Anyone can advise?

This is the API docs for anyone interested:

@loh.cher.e Put another content-type in your Charge with multiple quantity api call.

Header:

content-type : application/x-www-form-urlencoded

I’ve added it, but the exact same error comes up…

What you actually need to do is change the Body Type option (possibly as well as what you did at @lantzgould’s suggestion) :

image

That oughta do it!

Oof, I missed that. Thanks @keith.

@loh.cher.e I noticed when creating a custom Stripe Express integration, I’d have to sometimes paste the response manually. API connector can be finicky. :man_shrugging:

1 Like

Thanks for the advice! Still having the same error though. Just to make sure, i created a new call with the same settings and it still didn’t work…haha.

Anyway, I have submitted a bug report since you all mentioned that the settings should have worked. Will update when i get a reply!

Did you try pasting the response manually?

I solved it by ticking the queryst option. The other settings were all ok

6 Likes

This is a very well hidden solution.

I honestly don’t understand why we have to tick the queryst option. This is a POST call, not a GET call, so I don’t really understand what queryst is for, and why this only works if that check is ticked.

@eve @Bubble, could you please clarify?

Thanks.

PS: is there a single handle for the support team, so we don’t have to tag a single member in particular?

1 Like

Hi @eve, would you mind helping us out here when you have a chance? Many thanks.

Hey, i’m kinda new to API’s, and i’m having the exact same problem. Can you explain me what you did? What is this Queryst Option? Thanks in advance

Hey there @theomcortez , I’m still not sure till this day, but it seems like this problem only exists for POST calls. I just try it whenever i face the same error :smiley:

Was struggling a bit with this as well.

I just followed this thread. Somehow the querystring option only appears when you perform the steps as follows or you can click on Add Parameter:

Hope this helps someone!

2 Likes

Thank you for this! I wish there was better documentation for this because it is not very self explanatory.

Hey everyone,

I am encountering the same issue and it looks like the querystring method is the only thing that works properly.

I managed to get the content-type thing to work even without the querystring method by putting it in two different places but the body of my request call gets completely broken and sends messed up data (even though it technically works)

When I use postman I am able to POST the data to Stripe in the body of my request.

When I use Bubble I can only get it to work by posting it as querystring parameters, not body data.

Can someone shed some light on this?