HTTPS POST 400 Error

Hi All,

I’m attempting a POST from off of a On Before Page Enter event (just for testing) to Stripe to receive a session. I have this working in Postman, can someone provide a suggestion to understand how I may have malformed the request? If there isn’t any way to look deeper into the HTTP/s block I can post the full explanation of what I’m attempting.

Thanks!

I found that is an encoding error:
{
“message”: “Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at Stripe: Help & Support”,
“type”: “invalid_request_error”
}

HI Dustin,

The HTTP Request block currently doesn’t support form-urlencoded encoding for the requests. I am curious: which Stripe API requires the requests to use that encoding?

Regards,
Mark

Thanks, Mark.

Seems like this one: Create a Session | Stripe API Reference

Kind of odd. Is there a way we could work around this by manually creating the string or doing some raw codeless tricks? I need this piece badly even if ugly.

Thanks!

I think I have it, standby. ← famous last words

Setting the content type properly and building the string manually works. It’s not pretty, it is valid, however.

Thanks again!

Glad you got it resolved!