Why does Stripe use POST for customer updates instead of PATCH or PUT?

0
18
Asked By CuriousCoder99 On

I was checking out the Stripe API documentation for the Update a Customer endpoint and noticed that it uses a POST request to update customer details. This seems a bit unusual to me since RESTful APIs usually use PUT for full updates and PATCH for partial updates. I'm curious—what reasons might Stripe have for choosing POST for this operation?

5 Answers

Answered By RandomUser306 On

Sometimes, it's simply a matter of "because they can." There isn't always a deeper rationale behind these decisions beyond the fact that they're doing it their way.

Answered By SecureDev9 On

I've heard security auditors raise concerns about using anything other than GET and POST for API calls. If Stripe has to work with government systems, they might have to adhere to these standards for security reasons. I’m not saying I fully agree with them, but they can have a big influence on API choices.

Answered By RetroDev7 On

It's possible that Stripe's choice is just about maintaining compatibility, especially if their API has been around for a while and needs to support older integrations.

Answered By TechWhiz42 On

A lot of APIs don't strictly follow REST principles. Many just use GET for retrieving data and POST for changing it. Honestly, the other methods like PUT and PATCH can be useful for clarity, but many developers don't feel the need to enforce them. It's often more about practicality than adherence to technical rules.

Answered By APIFanatic123 On

It's interesting that you find it unconventional. Remember, API operations are fundamentally about formatted text. In the past, verbs weren't as important; POST was used extensively. Now, we often get caught up in following the rules too strictly but at the end of the day, it's just a name for an operation.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.