PM-02 // Payment & Distributed Systems
During a flash sale, impatient users multi-clicked the payment button. Due to lack of backend request deduplication and distributed locking, concurrent payment gateway charges were executed for identical cart states.
The incident flow, timings and root cause are real. Client and agency identities are not disclosed; identifying details such as dates, amounts and volumes have been generalized.
Incident Summary
During a flash sale, impatient users multi-clicked the payment button. Due to lack of backend request deduplication and distributed locking, concurrent payment gateway charges were executed for identical cart states.
Business & Technical Impact
Duplicate credit card charges in the $15–20k range across 70+ customers within 14 minutes, chargeback warning from payment gateway.
Incident Timeline
- T-02m (12:00) · Flash Sale Launched — Thousands of concurrent shoppers attempted to claim limited-edition inventory simultaneously.
- T+00m (12:02) · First Duplicate Charge Alert — A customer received 3 separate bank authorization SMS codes within 120ms for the same order.
- T+05m (12:07) · TMA Crisis Desk Dispatched — TMA inspected gateway logs: frontend lacked button throttling; backend had no idempotency header.
- T+09m (12:11) · Redis Redlock & Idempotency Key Deployed — Applied SHA-256 idempotency hashing on cart_id + amount. Locked gateway dispatch via atomic Redis SET NX EX 30.
- T+14m (12:16) · Duplicate Dispatch 100% Eliminated — Duplicate clicks intercepted before gateway API dispatch; duplicate charges isolated for auto-refund.
Root Cause Analysis (5 Whys)
1. Frontend payment CTA lacked click debouncing/disabling. 2. Backend failed to pass gateway Idempotency-Key headers. 3. Cart checkout mutation was not wrapped in an atomic distributed lock.
TMA SWAT Resolution & Hotfix
1. Enjected atomic Redis distributed locking before payment gateway handoff. 2. Appended deterministic idempotency hashes to all gateway capture calls. 3. Executed automated reconciliation script to issue instant refunds for all affected duplicate charges.
Permanent Mitigations
• Database constraint added: UNIQUE(order_id, payment_transaction_id). • Cryptographic single-use nonce added to all client-side checkout submissions.
All technical reviews and interventions are covered under our Confidentiality and Engagement Agreement (NDA).
Trend Master Akademi Studio & Labs
B2B White-Label Engineering Desk | Tel: +90 534 371 35 73 | Email: info@trendmasterakademi.com
Address: Akdeniz Mah. Sehit Fethibey Cad. Heris Tower No: 55 Ic Kapi No: 091 Konak / Izmir