medium

Design a Webhook Notification Service

Develop a webhook system that securely receives and processes notifications of various payment events from a payment gateway to a server. The system should validate and handle events such as payment successes, failures, and chargebacks, triggering appropriate actions within the application based on the event data received.

Suggested time: 45 minutes

Loading the workspace...

About this problem

Most systems you design in an interview are the caller, your service reaches out to databases, caches, third-party APIs. This problem inverts that model. Here, a payment gateway pushes events to you. You are the receiver. You do not control when events arrive, how many arrive at once, or whether the same event arrives twice. Your job is to accept every event, verify it is legitimate, process it exactly once, and never lose one.

Key challenges the editorial covers

Learn from other designs

Related problems

Guides