Although online shopping has become more and more popular, keeping clients is still a big problem. Satisfaction, which is mostly dependent on comprehending and establishing trust with customers, is what determines whether or not a business can retain its customers. In the ever-changing world of e-commerce, this study examines the relationship between consumer loyalty, happiness, and service quality, with a focus on brand trust. The findings indicate that several aspects of service quality, including order processing, speed, convenience, and quality of communication from couriers, have a big impact on how satisfied customers are with their online purchases. The most powerful element influencing pleasure, however, turned out to be ease. The relationship’s key mediator is brand trust. As a result, consumer loyalty is increased and uncertainty is decreased. In particular, in developing e-commerce countries such as Pakistan, the study emphasizes how important it is to enhance consumer happiness, service quality, and brand credibility. By stressing the mediating function of brand trust and highlighting the dynamics in emerging nations, this research adds to the body of current work. It emphasizes how crucial trust and quality customer service are to creating long-lasting, customer-focused e-commerce enterprises. While acknowledging its limits, the study provides useful insights and avenues for further cross-country research.