With fraud becoming more sophisticated, conventional detection methods are no longer effective, resulting in a worldwide impact on customers and organizations. To tackle this, cutting-edge technologies like machine learning and blockchain are being utilized by several institutions. This article assesses the efficacy of XGBoost, KNN, CatBoost, and Random Forest in detecting real-time fraud during financial transactions. Additionally, the paper discusses how blockchain technology can create a secure and tamper-proof database for financial transactions used in fraud detection. Our proposed financial fraud detection approach was analyzed using the "Synthetic data from a financial payment system," revealing that 98.79% of the dataset comprised genuine transactions, while 1.212% were fraudulent. The results showed that CatBoost had the highest accuracy rate, exceeding 99.46%, while Random Forest had the lowest accuracy rate of 98.31% among all algorithms. A machine learning and blockchain technique has finally been proposed to identify fraudulent bank transactions.