In the realm of financial security, the detection and prevention of credit card fraud has become paramount. With the ever-increasing reliance on digital transactions, the risk of fraudulent activities targeting credit card systems has grown significantly. To combat this, sophisticated techniques are required to swiftly identify and mitigate potential threats. Machine learning, a cornerstone of modern data analysis, has emerged as a powerful tool in this pursuit. By leveraging vast datasets and employing advanced algorithms, machine learning enables the automated scrutiny of transactions, distinguishing between legitimate and fraudulent activities with remarkable precision. This paper introduces an intelligent method for credit card fraud detection that relies on Competitive Swarm Optimization (CSO) and Random Weight Network (RWN). Additionally, the system includes an automated hybrid feature selection capability to identify the most pertinent features during the detection process. The experimental outcomes validate that this system can attain outstanding results in G-Mean, RUC, and Recall values.