The widespread use of credit cards has led to an increase in fraud. Credit card fraud detection involves identifying and preventing fraudulent transactions, either in real-time or post-occurrence. This paper seeks to create an advanced credit card fraud detection model via data mining. The proposed method comprises four essential steps: data acquisition, preprocessing, feature selection, and fraud detection. A recent balanced dataset is acquired, containing 28 anonymized features about the credit card transactions, along with the transaction amount and the transaction label (normal or fraud). The dataset is then explored to clean it and ensure its integrity. Feature selection is executed via the Energy Valley Optimization (EVO) metaheuristic method, employing the accuracy value of the Light Gradient Boosting Machine (LGBM) as the fitness function. This results in a 30% reduction in features. The reduced dataset is then input into the classification step, where an ensemble soft voting model is applied. This model encompasses Extra Trees, eXtreme Gradient Boosting (XGBoost), and Categorical Boosting (CatBoost) classifiers. The proposed model averages the probability of the three classifiers for each label and outputs the label with the highest average probability. The proposed method is assessed using recall, precision, accuracy, and F1-score, attaining 99.89%, 99.58%, 99.74%, and 99.74%, respectively. The proposed approach is evaluated against existing machine learning classifiers and relevant studies using the same dataset, showcasing enhanced performance and confirming its efficacy in identifying credit card fraud.