APIs as infrastructure: future-proofing Stripe with versioning
1–10 of 53 posts
Re: APIs as infrastructure: future-proofing Stripe with versioning
#2I wish other payment services treated their long-time clients with the same respect (looking straight at you, GoCardless).
Re: APIs as infrastructure: future-proofing Stripe with versioning
#3Does anyone know of packages that do this already? I have been contemplating creating one in PHP/Laravel for a long time but haven't had the time yet...
Re: APIs as infrastructure: future-proofing Stripe with versioning
#4We're in the early stages of deploying a new RESTful stack, and versioning is a hot topic (along with getting people out of the RPC mindset and into a resource-based paradigm). While version bumps should be much less common, we'll probably end up doing something similar to our cascading transformations. Essentially, the old version becomes a consumer of the new version, and as long as the new version continues to hold to its API contract, everything should work with minimal fuss. Of course, that's assuming that we don't change the behavior of a service in ways that aren't explicitly defined in the API contract...
Re: APIs as infrastructure: future-proofing Stripe with versioning
#5This is a really smart way to do it.
One question is, over the years, wouldn't you add a lot of overhead to each request in transformation? Or do you have a policy where you expire versions that are more than 2 years old, etc? (skimmed through parts of the article so my apologies if you already answered this)
Re: APIs as infrastructure: future-proofing Stripe with versioning
#6Hey, @pc with all the spare time your team has accumulated by using this api model maybe you could put it to good use. Might I suggest it's time to divert most of your tech resources into creating the next Capture the Flag? Because those were just awesome!
I'm joking, in case it's not obvious (but I would absolutely love another Stripe CTF).
Re: APIs as infrastructure: future-proofing Stripe with versioning
#7It was a delight to get a peek behind the curtain. :)
Re: APIs as infrastructure: future-proofing Stripe with versioning
#8In general, the concepts employed by Stripe really encourage better design choices. All changes, responses, request parameters, etc should be documented and then handled automatically by the system. We took this approach in our design, although we don't do it with an explicit "ChangeObject" like Stripe does; it's a great idea though.
Hoping to be able to put out a blog post once we start implementing the system and getting feedback on what works and doesn't work well.
Re: APIs as infrastructure: future-proofing Stripe with versioning
#9For anyone else who's interested, they've written/talked about this a few times over the years, to fill out the picture:
- http://amberonrails.com/move-fast-dont-break-your-api/
- https://www.heavybit.com/library/video/move-fast-dont-break-...
- https://speakerdeck.com/apistrat/api-versioning-at-stripe
- https://brandur.org/api-upgrades
- https://news.ycombinator.com/item?id=13708927
It sounds like their YAML system has changed to be implemented in code instead, which maybe allows the transforms to be a bit more helpful/encapsulated. If anyone from Stripe is here, it would be awesome to know if that's true and why the switch?
Re: APIs as infrastructure: future-proofing Stripe with versioning
#10I work on a SOA team at a large healthcare enterprise. We currently write mostly SOAP APIs (yeah, I know, 2017 and all that...), and follow a typical pattern as what Stripe describes: Whenever we do a version bump (which is extremely frequent, since a WSDL breaks a contract the moment you sneeze at it), we create an XSLT transform from the new version back to the old. So if you're calling version 2, but the current v…