Upgrade idempotency and duplicate webhook drill

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
- Define the idempotency-key format and validation for POST /upgrade (source, length, collision rule).
- Design the webhook deduplication store: key fields, time-to-live (TTL), cleanup strategy, and read flow.
- 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