To address this challenge, I initiated a thorough investigation, collaborating closely with the backend engineers, QA specialists, and product managers. We meticulously analyzed the codebase, conducted extensive testing, and gathered data to pinpoint the specific conditions triggering the race condition. Through our collaborative efforts, we discovered that the issue stemmed from a subtle timing discrepancy between the frontend and backend systems, causing the payment rules to be inconsistently applied.