TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Stripe V2

101 pointsby surprisetalk5 months ago

12 comments

rglover5 months ago
&gt; Few of us want to be making manual HTTP calls out to APIs anymore. These days a great SDK, not a great API, is a hallmark, and maybe even a necessity, of a world class development experience.<p>I&#x27;m of the opposite mind. A simple API that I can just call with Fetch is far better than having to learn most SDKs. Stripe&#x27;s Node.js SDK is fairly clean&#x2F;without headaches, but I look at stuff like the AWS JS SDK and want to gouge my eyes out.<p>At least with an HTTP API, there&#x27;s some modicum of standardization. SDKs are and will always be the wild west. The only exception with this that I see frequently is authentication. Some are simple Authorization headers w&#x2F; a Bearer &lt;Token&gt;, others (like PayPal the last time I implemented it) require an undocumented base64 encoding of the token.
评论 #42545280 未加载
评论 #42545952 未加载
评论 #42545646 未加载
评论 #42545499 未加载
评论 #42547127 未加载
评论 #42545413 未加载
评论 #42545647 未加载
评论 #42566005 未加载
评论 #42546357 未加载
评论 #42546401 未加载
评论 #42550409 未加载
stuartjohnson125 months ago
&gt; The new API is trying to move away from a model where subobjects in an API resource are expanded by default, to one where they need to be requested with an include parameter. We had plenty of discussions about this before I left.<p>This feels like the worst middleground between REST and GraphQL. All of the data flexibility of GraphQL with the static schemas of REST. Wasn&#x27;t this kind of thing the whole idea underpinning GraphQL?<p>Maybe you can get around this with new SDK generators handling type safety for you, but I am definitely not looking forward to trying to understand the incomprehensible 5 layers of nested generics needed to make that work.<p>I remember looking up to Stripe as pioneers of developer experience. This reads like a PM with their back against the wall with a mandate from above (make requests n% faster) rather than a developer-first design choice made to help people build better systems.
评论 #42544465 未加载
评论 #42545021 未加载
rcaught5 months ago
&gt; These days a great SDK, not a great API, is a hallmark, and maybe even a necessity, of a world class development experience.<p>IMO, you can&#x27;t build a great SDK without a great API. Duct tape only goes so far.
评论 #42544709 未加载
评论 #42545549 未加载
评论 #42550419 未加载
jsnell5 months ago
&gt; There was a time not too long ago when Stripe cutting a new API version would’ve been a major event in the tech world, but in three months I didn’t come across a single person who mentioned it.<p>I don&#x27;t think it would have been a major event, ever. Few people care about a API version bump in the abstract. It&#x27;ll mostly be big news if it&#x27;s bad news somehow (user-visible feature regressions, access restrictions, etc) or if there&#x27;s some <i>significant</i> new features.<p>This appears to be neither. It&#x27;s just inconsequential re-arranging of the living room furniture for better feng shui.
aftbit5 months ago
&gt;That’s got to be true too. Few of us want to be making manual HTTP calls out to APIs anymore. These days a great SDK, not a great API, is a hallmark, and maybe even a necessity, of a world class development experience.<p>I may be in that &quot;few of us&quot; set because I really prefer a simple HTTP API that I can implement myself rather than having to take a library dependency on some code with transitive dependencies and unknown future maintainership. A good SDK is nice to have but a integrating with a bad one by accident is horrible.
stnderror5 months ago
There are a couple of changes more that arguably made the API worse:<p>* Event payloads changed to be “thin events”<p>* List endpoints became only eventually consistent<p>They also took away the “expand” parameter, which seems more useful that the new “include” one that works in some endpoints.<p>Generally their API design seems much more confusing and inconsistent nowadays. But to be fair their API is much bigger too. I guess it is hard to keep the same quality when you have so many engineers working on it.
评论 #42545976 未加载
HatchedLake7215 months ago
Strange that <a href="https:&#x2F;&#x2F;jsonapi.org&#x2F;examples&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jsonapi.org&#x2F;examples&#x2F;</a> never went into the masses, I suspect because it came out around the same time as GraphQL.<p>For me it’s the perfect mix between doing REST from scratch and GraphQL.<p>And it comes with the similar include and expand pattern that Stripe v2 introduced.
评论 #42545936 未加载
yasserf5 months ago
I feel that with typescript you can sort of build an SDK by creating a thin wrapper around fetch and have it consume the API types as a generic.<p>This way you still have the benefits of type safety without the bloat of creating an actual SDK.<p>SDKs tend to be useful when they hold state &#x2F; don’t just proxy to a rest call, but I don’t see why we need wrapper libraries. They also hide away the complexity of knowing how the rest api is meant to consume data (query &#x2F; params &#x2F; body &#x2F; encoding). So the assumption is the rest API itself makes sense.<p>I took this approach with a backend typescript framework called vramework.dev which can generate openapi specs as well as the thin fetch wrapper, and feel like for my projects satisfies my needs.
lonelygiraffe5 months ago
If you use APIs make sure you don’t break them: <a href="https:&#x2F;&#x2F;github.com&#x2F;Tufin&#x2F;oasdiff">https:&#x2F;&#x2F;github.com&#x2F;Tufin&#x2F;oasdiff</a>
rattray5 months ago
&gt; a new API version also presents an opportunity to clear out blemishes, and I expected to see more of that<p>Curious, what are some other Stripe API blemishes that folks would have liked to see cleaned up in a v2?
quantumwoke5 months ago
Reminiscent of the changes to the Microsoft Graph API, which personally I wasn&#x27;t a fan of. Hope stripe can maintain its developer first mentality.
efilife5 months ago
&gt; Few of us want to be making manual HTTP calls out to APIs anymore.<p>What&#x27;s the other way?
评论 #42544750 未加载
评论 #42544735 未加载