As the world is rapidly moving towards digitalization and monetary transactions are becoming cashless, new developments in e-commerce systems and communication technologies have made credit cards the most popular payment method for both conventional and online purchases. And its use is increasing rapidly. Accordingly, the problem of credit card fraud emerges and there is a significant increase in fraud associated with such transactions, resulting in huge losses for financial institutions. Therefore, there is a need to analyze and identify fraudulent transactions and there are efficient and effective approaches to detect fraud in credit card transactions. Currently, machine learning methods have been proposed to overcome these challenges. These methods include hidden Markov model, decision trees, logistic regression, support vector machines, genetic algorithm, neural networks, random forests, Bayesian belief network. In order to increase the accuracy and reduce the error rate in detection, in this research, a credit card fraud detection method is presented with the help of machine learning algorithms and feature selection with the aim of solving the problems of convergence, network failure and system stability. The result show that in the case of Recall, Precision and Accuracy, there has been an average improvement of 2% compared to the other methods compared with the proposed method. Based on the evaluations carried out in the Python environment, it has been proven that this approach minimizes the error rate and increases the detection rate of fraud.