In the ever-evolving landscape of global commerce, marked by the convergence of digital transformation and borderless markets, this research addresses the intricate challenges of currency exchange and risk management. Leveraging Bayesian optimization, the study fine-tunes the random forest algorithm using the extensive Klarna E-commerce dataset. Through systematic analysis, the research uncovers insights into managing currency prediction amid dynamic global markets. Emphasizing the role of Bayesian optimization parameters, the study reveals nuanced trade-offs in model performance. Notably, the optimal simulation, conducted with 14 iterations, 1 job, and a random state set to 684, exhibits a standout performance, showcasing a negative mean squared error (MSE) of approximately -0.9891 and an accuracy rate of 74.63%. The primary objective is to assess the impact of Bayesian optimization in enhancing the random forest algorithm's predictive capabilities, particularly in currency prediction within international e-commerce. These findings offer refined strategies for businesses navigating the intricate landscape of global finance, empowering decision-making through a comprehensive understanding of data, algorithms, and challenges in international commerce.