Design Reliable Webhook Delivery to Merchant Servers
Last updated: November 29, 2026
Quick Overview
Design the system that notifies merchants of payment events (authorisation, capture, refund, chargeback) over HTTP webhooks, guaranteeing at-least-once delivery even when merchant endpoints are slow or down for hours.
Adyen
November 29, 20260
0
0 solved
Design the system that notifies merchants of payment events (authorisation, capture, refund, chargeback) over HTTP webhooks, guaranteeing at-least-once delivery even when merchant endpoints are slow or down for hours.
Adyen merchants rely on webhooks to update orders, and some events, like a chargeback, only ever arrive this way. The interviewer wants durable queuing, retry with backoff, per-merchant isolation so one broken endpoint does not delay others, and a clear contract on ordering and duplicates.
What the Interviewer Expects
- Persist events before attempting delivery
- Retry with exponential backoff and a long retry horizon
- Isolate merchants so a slow endpoint cannot starve the rest
- Define the delivery contract: at least once, no global ordering, unique event ids
- Sign payloads with HMAC so merchants can verify them
- Offer replay and visibility of failures in a merchant dashboard
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- A merchant needs events for a single payment in order. How would you support that?
- One large merchant's endpoint goes down at peak. What protects everyone else?
- How would you let a merchant request a replay of the last 24 hours?
- How do you rotate HMAC keys without breaking verification?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Every payment event produces a notification per configured merchant endpoint. Delivery is at least once; merchants dedupe by event id. Retries continue for days with backoff. A merchant acknowledges w...
High-Level Design
The payment service writes the event to an outbox table in the same transaction as the state change, so no event is lost if the process dies. A relay moves outbox rows into a durable log partitioned b...