Analyst Bootcamp Join on TelegramJoin
Drill #28 · 2026-11-03

Upgrade idempotency and duplicate webhook drill

Upgrade idempotency and duplicate webhook drill: sequence diagram (AS-IS · Seat upgrade flow today)
AS-IS · Seat upgrade flow today · hand-drawn sequence diagram: how things work today, the starting point for the task

The situation

You are the analyst for SkyLine's Upgrade Service. The mobile app POSTs /upgrade to the Nimbus Upgrade API, which reserves a seat via AeroInv and charges PayFlow. PayFlow later sends a payment-status webhook to the same API. Last week 42 upgrades were double-charged because clients retried the request and the webhook arrived twice.

Your task

  1. Define the idempotency-key format and validation for POST /upgrade (source, length, collision rule).
  2. Design the webhook deduplication store: key fields, time-to-live (TTL), cleanup strategy, and read flow.
  3. Create a response matrix for duplicate request vs webhook and argue client-provided vs server-generated keys.

What this idempotency & duplicate handling exercise trains for system analysts

Clients retry requests and webhooks arrive twice. Specify keys, storage, TTLs and responses so money and stock are never double-counted. The setting is airline / travel booking: PNR, fare rules, ancillaries, check-in, seat maps, irregular operations, refunds, GDS.

Typical deliverables for this kind of task:

  • idempotency key rules
  • storage/TTL design
  • response matrix for duplicates

Middle level: two or three interacting rules or systems, 2 deliverables, one real trade-off; a focused slice of a bigger problem. Budget 30–70 minutes.

#airline#idempotency#webhooks#api_design

Read the theory first