Blog · 28 October 2026 · 6 min read

API integrations that don't break at night

Timeouts, duplicate webhooks, half-written records: four patterns that make an integration robust.

API integrations that don't break at night

Building an integration between two systems is quick. Building it so that it still works when the other system is slow, sends things twice or goes down briefly is the real work. From years of working with payment and billing systems, these are the four patterns I always use.

1. Idempotency

Every request that changes something carries a unique key. If the same request arrives twice, for example because a webhook is retried, the action still happens only once. Without this you get duplicate invoices.

2. Careful retries

Failed calls are retried automatically, but with growing intervals and an upper limit. Otherwise a short outage at your partner turns into a self-made load attack.

3. Queues instead of tight coupling

Incoming events land in a queue first and are processed from there. If processing fails, nothing is lost; messages that keep failing go to a separate dead-letter store and trigger an alert.

4. A translation layer

Your partner's data model doesn't belong in the core of your application. A small layer translates between the two worlds. When the provider changes its API, only that layer needs to change.

And then: observe

Structured logs, a correlation ID per operation and alerts on error rates rather than every single error. That way you know in the morning what happened overnight, not only when a customer calls.

Ibrahim DoganSoftware Engineer & Consultant, Hamburg

Have a project in mind?

Tell me briefly what it's about. You'll get an honest assessment and, if it's a fit, a concrete proposal.

Discuss your project