Stripe API call sends json instead of form encoded. cant make it work

When I pass an API call to stripe from the module, it is apparently sending a json payload, but stripe wants form encoded. I am creating a connected account. Here is the feedback from Stripe support.


Unfortunately, Make isn’t a tool I’m familiar with, so the guidance that I can offer will be limited, but I do think you currently have it set up to pass a JSON payload rather than form-encoded data. Skimming their docs [0], I notice that I’m not seeing the Fields section, that I’m getting the impression you would see once you set your Body type to Application/x-www-form-urlencoded, in your screenshot.

I do believe there is a misalignment between the payload type you’re sending us and the type we’re expecting to receive, and that aligning those will resolve the behavior you’re seeing currently.

Please send your input and output so we can help here. Thanks

Hi @Greyson_Schwing

The first sentence of the Stripe API documentation clarifies indeed:

The Stripe API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

That means that… well, you know what it means. If you use the Stripe App in Make for the authentication, you can use the Make an API module and fill in the data you want as query params (easiest for mapping):

Or you can pass the data in the following format in the body (little harder for mapping):

Cheers,
Henk

2 Likes

This worked like a charm! thank you very much!

2 Likes

Thanks for the feedback, @Greyson_Schwing. Happy to hear that it worked! You can mark my answer as ‘solution’, so this topic can be marked as solved.
Scherm­afbeelding 2024-06-29 om 07.53.12

Have a good weekend!

Cheers,
Henk

2 Likes