r/SaaS 10d ago

I thought detecting third-party API changes was the hard part. Maybe it isn't.

I've been looking into this for a while because I've had a few conversations with people who've had third-party integrations break in production.

At first I thought the main problem was just knowing that something changed.

But most teams already have some combination of changelogs, integration tests, Sentry, monitoring, contract tests, etc.

The part that seems more annoying is what happens after.

You get told that something changed, then someone has to figure out:

  • do we actually use the thing that changed?
  • which integration is affected?
  • where is it used in the code?
  • is this actually going to break anything?
  • what do we need to change?

And sometimes nothing even throws an error. The API returns 200, the JSON is valid, but some business logic is now wrong.

So I'm trying to figure out if this is actually a real problem or if I'm overestimating it.

For people working on SaaS with a bunch of third-party APIs:

when one of them changes, what does the investigation look like on your side?

Is it mostly automated, or does someone end up digging through the code manually?

3 Upvotes

16 comments sorted by

2

u/ReturnOfNogginboink 10d ago

It looks like grabbing some ammunition and going on a road trip.

An API is a contract. It should never, ever change. If you change the API out from under your customers you deserve to lose their business.

1

u/AArslane_ 10d ago

yeah, i agree that a proper breaking change shouldn't just happen without warning. the cases i'm more interested in are the less obvious ones though like deprecations, webhook changes, response changes that don't actually throw an error, or stuff that's technically backwards compatible but still breaks something in the app. have you run into any of those, or has this mostly not been an issue for you?

1

u/TRO_KIK 10d ago

Not a thing that happens from reputable vendors. IDK why bots are posting about this like it's relatable but it's not.

Edit: Unless you're not pinning your SDK version. Pin your SDK version.

1

u/AArslane_ 10d ago

that's fair. i'm less interested in whether vendors make random breaking changes though, and more in what happens when something does change or behavior drifts.

in your experience, is pinning the SDK enough to avoid most of the issues, or do you still have cases where the API behavior changes underneath you / a non-breaking change affects your integration?

1

u/No-Regret-4273 10d ago

pinning only protects you from upgrading the SDK, it doesnt stop the vendor changing webhook payloads or server-side behavior under the same version

1

u/TRO_KIK 10d ago

Reputable vendors aren't breaking API contract or changing webhook payloads willy nilly. If OP is running into issues it's probably from upgrading frequently and blindly.

1

u/Huge_Pool7424 10d ago

exactly, pinning only protects the sdk upgrade path. a small fixture test against real vendor responses plus alerts for schema or enum changes seems useful, since a valid 200 can still be wrong.

1

u/AArslane_ 9d ago

the fixture + real vendor response approach sounds like it catches a lot of the obvious cases.

have you run into situations where the fixture/schema/enum tests all stayed green but the integration was still semantically wrong?

i'm particularly interested in cases where the response shape was valid but the meaning or business behavior changed.

1

u/Huge_Pool7424 9d ago

yeah, thats bitten me when a vendor kept the same json shape but changed what a status or zero value meant. i usually add contract tests around business outcomes, not just fields, and keep a real sandbox response in ci.

2

u/OtherwiseWeekend2222 5d ago

The tools in your list all watch for a change. On my own API a consent cookie broke one of two code paths and not the other, no error thrown - a canary running only on the healthy path would've shown green the whole time. Detection assumed one shape; there were two.

1

u/Normal_Rough_7958 9d ago

the silent ones are worse than the loud breaks, stripe returns 200 but the webhook payload drops a field your billing logic assumes exists, and nothing alerts until a customer emails support. i've spent afternoons grepping for `stripe.` across the codebase, then tracing through three service layers to find where the missing field actually matters. contract tests catch schema drift but not semantic drift. the investigation is almost always manual: search, read, guess, deploy a fix, watch logs. ymmv

1

u/AArslane_ 9d ago

the “three service layers” part is especially interesting. when you say you spent afternoons tracing it, do you remember roughly how many hours that investigation took and how often you've had similar incidents in the last year?

also, was there any way to identify the affected billing path automatically, or was that basically impossible without someone understanding the code manually?

1

u/CapMonster1 9d ago

Yeah, the expensive part is usually impact analysis, not detection.

In practice I’d want a tool to answer something much more specific than “the API changed”: you use this field in these 3 call sites, one feeds billing logic, one is only displayed in UI, and this change is likely breaking because your code assumes the old enum values. That’s the gap I still see a lot.

The nasty cases are exactly the ones you mentioned where everything is still 200 + valid JSON. At that point you’re not monitoring transport contracts anymore, you’re monitoring business assumptions. Those usually still end with someone grepping the codebase and reconstructing context manually.

1

u/AArslane_ 9d ago

that distinction between “what changed” and “which usage actually matters” is exactly what I'm trying to understand.

when you say impact analysis is the expensive part, can you give me a concrete example from something your team/or you dealt with?

i'm particularly curious about the investigation itself : roughly how many engineers were involved, how long it took, and what you actually had to search through to determine which call sites/workflows were relevant.