In recent years, with the increase of access to customer data and the improvement of data analysis capabilities through intelligent methods, various activities have been carried out to analyze customer behavior; it is in the detection of bank frauds. Currently, bank frauds have a wide range of results, other than material and financial losses to the bank, customers and banks. After using smart tools to use different algorithms, the two selected algorithms XGBoost and LightGBM, according to the high ROC in the obtained models were selected step by step. At the same time, it has been used in final tests with the reduction of false samples labeled as fraud (FP). This model is developed using real development data and gives very acceptable results in card-to-card fraud detection. This model can significantly improve the security of the banking system and be used as a tool to reduce financial crimes.