Integration of Machine Learning Models Random Forest and XGBoost for Credit Card Fraud Detection in a Python Flask-Based Application
Abstract
Credit card fraud is one of the major challenges in modern digital payment systems. The increasing volume of online transactions raises the potential for unauthorized use of cardholder data. This research aims to develop a robust and accurate fraud detection system by integrating two machine learning algorithms, Random Forest and XGBoost, both of which are known for their high performance in data classification. The research process begins with the collection and preprocessing of credit card transaction data, followed by model training using the selected algorithms. The model’s performance is evaluated using metrics such as accuracy, precision, recall, and F1-score. To enable real-time application, the model is implemented in a web-based system using the Python Flask framework, allowing direct integration into financial transaction environments. The need for adaptive systems that can respond to emerging fraud patterns serves as a key motivation for this study. By combining two complementary algorithms within a single web application platform, the system is expected to detect fraudulent activities quickly and accurately. The expected outcomes of this research include: (1) an optimized fraud detection model based on Random Forest and XGBoost, (2) a prototype web application developed with Python Flask for system implementation, and (3) a scientific publication describing the development and results of the proposed system. The targeted outputs are a publication in a nationally accredited journal (Sinta 4) and intellectual property registration. This research is expected to provide a significant contribution to preventing credit card fraud through the effective application of machine learning technologies
Downloads
References
. Billah KS, Saputra RA, Teknik F, Oleo uh. Deteksi penipuan kartu kredit menggunakan metode random. 2024;8(2):200–8.
. Suhartono NA, Engel VJL. Penerapan Extreme Gradient Boosting ( XGBoost ) dengan SMOTE untuk Deteksi Penipuan Kartu Kredit. 2015;
. Ariyani R, Gunadarma u. State of the art fraud detection pada kartu kredit dengan menggunakan pendekatan algoritma dan teknik machine learning. 2023;2(2):147–53.
. Armiani R, Agustini EP. Analisa Fraud Pada Transaksi Kartu Kredit Menggunakan Algoritma Random Forest. J Teknol Inf dan Terap. 2022;9(2):118–26.
. Ningsih PTS, Gusvarizon M, Hermawan R. Analisis Sistem Pendeteksi Penipuan Transaksi Kartu Kredit dengan Algoritma Machine Learning. J Teknol Inform dan Komput. 2022;8(2):386–401.
. Werdiningsih I, Purwanti E, Wira Aditya GR, Hidayat AR, Athallah RSR, Sahar VA, et al. Identifikasi Penipuan Kartu Kredit Pada Transaksi Ilegal Menggunakan Algoritma Random Forest dan Decision Tree. J Sisfokom (Sistem Inf dan Komputer). 2023;12(3):477–84.
. Muhammadiyah U, Aceh M, Nusantara UB. Penggunaan Algoritma Support Vector Machine ( SVM ) Untuk Deteksi Penipuan pada Transaksi Online. 2024;13:1627–32.
. Kurniawan A, Yulianingsih Y. Pendugaan Fraud Detection pada kartu kredit dengan Machine Learning. Kilat. 2021;10(2):320–5.
. Afifudin M, Rizki AM. Analisis Perbandingan Penggunaan Model Machine Learning Pada Kasus Deteksi Kemampuan Calon Klien Dalam Membayar Kembali Pinjaman. Scan J Teknol Inf dan Komun. 2023;18(2).
. Zheng Q, Yu C, Cao J, Xu Y, Xing Q, Jin Y. Advanced Payment Security System:XGBoost, CatBoost and SMOTE Integrated. 2024; Available from: http://arxiv.org/abs/2406.04658
. Ilmiah J, Jinu N, Mei N, Ibrahim mm. Analisis kinerja model machine learning untuk mendeteksi transaksi fraud pada sistem pembayaran online Universitas Terbuka 2 . 1 Konsep Dasar Deteksi Fraud dalam Transaksi Online dengan cara memanipulasi informasi transaksi untuk mendapatkan keuntungan se. 2025;2(3):35–49.
. Fadlil A. Performa Random Forest dan XGBoost pada Deteksi Penipuan E-Commerce Menggunakan Augmentasi Data CGAN. 2024;6(3):1919–31
. E. Oktafanda, N. W. Al-Hafiz, A. Latif, and F. Santosa, “Analysis and Design of Monolithic System Architecture Migration to Microservices at PT. MALINDO Conceptual Approach”, JTOS, vol. 8, no. 1, pp. 54 - 63, May 2025.
. S. N. Manihuruk, Mhd. Furqan, and A. H. Lubis, “Sentiment Analysis of Loudspeaker Regulations in Houses of Worship on Social Media Using Support Vector Machine Algorithm”, JTOS, vol. 8, no. 1, pp. 44 - 53, May 2025.
. A. Novrianty, M. Furqan, and S. Sriani, “Sentiment Analysis Related To Covid-19 Vaccination On Social Media Using The K-Nearest Neighbor (K-NN) Method”, JTOS, vol. 8, no. 1, pp. 64 - 75, May 2025.
. B. Samadyo and A. Pramudwiatmoko, “Implementation of Mobile-Based E-Kost System to Optimize Online Search, Booking, and Payment”, JTOS, vol. 8, no. 1, pp. 76 - 85, May 2025.
. Mambu, J. Y., Sahulata, R. A., Tambanua, S., & Pangau, J. (2025). Application of COBIT 2019 Design Factors in Strengthening IT Governance in the Palm Oil Plantation Sector. JURNAL TEKNOLOGI DAN OPEN SOURCE, 8(1), 86 - 96. https://doi.org/10.36378/jtos.v8i1.4281
. Amri, H., Nurdiawan, O., & Rinaldi Dikanda, A. (2025). Real-Time Face Attendance System Using CNN Mobilenet and MTCNN. JURNAL TEKNOLOGI DAN OPEN SOURCE, 8(1), 164 - 179. https://doi.org/10.36378/jtos.v8i1.4403
. Atim, S. B., & Ibrahim, M. Y. I. I. (2025). Rule-Based Expert System Model with Backward Chaining Algorithm for Symptom-Based Skin Disease Diagnosis. JURNAL TEKNOLOGI DAN OPEN SOURCE, 8(1), 288 - 294. https://doi.org/10.36378/jtos.v8i1.4416
. Nopriandi, H., Al-Hafiz, N. W., & Chairani, S. (2025). Analysis and Modeling of the Internal Quality Audit Information System Islamic University of Kuantan Singingi. JURNAL TEKNOLOGI DAN OPEN SOURCE, 8(1), 398 - 408. https://doi.org/10.36378/jtos.v8i1.4456
. Fong, F., Ciptady, R., & Anita, A. (2025). Implementation of Grid Search Optimization Algorithm and Adaptive Response Rate Exponential Smoothing In Product Sales Prediction. JURNAL TEKNOLOGI DAN OPEN SOURCE, 8(1), 409 - 419. https://doi.org/10.36378/jtos.v8i1.4437
. Febri Haswan, & Bromi Saputra. (2025). Rancang Bangun Sistem Informasi Ujian Online di SD Negeri 004 Sungai Manau. Jurnal SINTIKA (Jurnal Sistem Informasi, Teknik Informatika, Dan Sistem Komputer), 1(3), 92-101. https://doi.org/10.65359/sintika.2025.13.92
. Nofri Wandi Al-Hafiz, & Asril Annas. (2025). Rancang Bangun Sistem Informasi Pengolahan Data Transaksi Penjualan pada ARD Photo Studio. Jurnal SINTIKA (Jurnal Sistem Informasi, Teknik Informatika, Dan Sistem Komputer), 1(3), 102-109. https://doi.org/10.65359/sintika.2025.13.102
. Elki Arianda Pratama. (2025). Rancang Bangun Sistem Informasi Pendaftaran Kartu Identitas Anak (KIA) di Dinas Kependudukan dan Pencatatan Sipil Kabupaten Kuantan Singingi. Jurnal SINTIKA (Jurnal Sistem Informasi, Teknik Informatika, Dan Sistem Komputer), 1(3), 126-133. https://doi.org/10.65359/sintika.2025.13.126
. Zulfebri Ardiansyah. (2025). Perancangan Sistem Informasi Antrian Pada Layanan Pengadaan Secara Elektronik (LPSE) Kabupaten Kuantan Singingi. Jurnal SINTIKA (Jurnal Sistem Informasi, Teknik Informatika, Dan Sistem Komputer), 1(1), 25-31. https://yasiinpublisher.org/index.php/SINTIKA/article/view/20
Copyright (c) 2025 Herianto Heri, Zupri Henra Hartomi, Rian Ordila, Yuda Irawan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
This is an open-access article distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License which permits unrestricted use, distribution, and reproduction in any medium. Users are allowed to read, download, copy, distribute, search, or link to full-text articles in this journal without asking by giving appropriate credit, provide a link to the license, and indicate if changes were made. All of the remix, transform, or build upon the material must distribute the contributions under the same license as the original.












