Connecting your software to payment providers, CRMs, shipping carriers, and analytics tools is where a lot of real business value lives — and where a lot of 2 a.m. incidents come from. Third-party APIs go down, change their contracts, and rate-limit you at the worst possible moment. The goal isn't to avoid integrations; it's to build them so that someone else's outage doesn't become yours. Here are the patterns that make that possible.
Treat every integration as an untrusted dependency
The core mindset shift: an external API is not part of your system, even though it feels like it. It can be slow, return malformed data, go offline, or change behavior overnight — all without telling you. Once you accept that, you stop writing integration code that assumes the happy path and start writing code that survives the unhappy ones.
Concretely, that means never trusting a third party's availability or response shape. Every call can fail; every payload should be validated before you act on it. This single assumption prevents most integration disasters.
Resilience patterns that pay off
A handful of well-known patterns turn fragile integrations into robust ones:
- Retries with backoff. Transient failures (a timeout, a brief 503) are common. Retry automatically, but with exponential backoff and a cap, so you recover from blips without hammering a struggling service.
- Idempotency. If you retry a request that actually succeeded, you don't want to charge a card twice or create duplicate orders. Use idempotency keys so repeated calls are safe.
- Circuit breakers. When a service is clearly down, stop calling it for a while. A circuit breaker fails fast instead of letting every request hang, which protects your own system from being dragged down with theirs.
- Graceful degradation. Decide in advance what happens when an integration is unavailable. Can you queue the work, show a fallback, or proceed without the non-critical feature? An outage in a recommendations API shouldn't take down checkout.
These aren't exotic; they're standard tools that most fragile integrations simply skip.
Decouple with queues and async processing
Synchronous integration calls couple your response time to someone else's. If your checkout waits on a slow CRM sync, your customer waits too. Wherever the work doesn't need to happen in the request, move it to a background queue.
This buys you a lot: the user gets a fast response, retries happen out of band, and a downstream slowdown becomes a processing delay rather than a user-facing failure. Queues also smooth out rate limits — you can drain work at whatever pace the third party allows instead of bursting and getting throttled.
Handle change: webhooks, versioning, and contracts
Integrations don't just fail at runtime; they drift over time as the provider evolves.
- Pin to API versions where the provider supports it, so an upstream change doesn't silently break you. Upgrade deliberately, on your schedule.
- Validate incoming data — including webhooks — against the shape you expect, and verify webhook signatures so you're not acting on spoofed events.
- Make webhook handlers idempotent, because providers will occasionally deliver the same event more than once.
- Watch for deprecation notices. A quiet email about a sunset date is the cheapest warning you'll ever get; missing it is the most expensive.
Observability: know before your customers do
The worst way to learn an integration broke is a customer complaint. Build in visibility from the start:
- Log every integration call with enough context to debug — what you sent, what came back, how long it took.
- Track error rates and latency per integration, and alert when they cross a threshold. A creeping error rate is an early warning you can act on.
- Monitor the business outcome, not just the HTTP status. "Payments succeeded in the last hour" tells you more than "the payments API returned 200."
Good observability turns silent failures into noticed-and-fixed ones before they spread.
Build vs. middleware: when to use an iPaaS
Not every integration justifies custom code. Integration platforms (iPaaS tools) can connect common systems quickly, with prebuilt connectors and managed reliability. They're a great fit when the integration is standard, the volume is modest, and speed matters more than control.
Build custom when the integration is core to your product, needs specific business logic, runs at high volume, or demands tight control over reliability and data handling. As with most build-vs-buy questions, the answer often is "buy the commodity connections, build the strategic ones."
The payoff
Resilient integrations are quieter. They retry instead of paging you, degrade instead of crashing, and surface problems early instead of failing silently. None of it requires heroics — just the discipline to assume external services will misbehave and to build for that reality from the start.
Need integrations you can trust? See our integration services, or tell us what you're connecting.

