Not illegal. As a legal payment method, credit cards are usually regulated by regulatory agencies. Various countries and regions generally regard credit card transactions as legal payment activities. As long as both parties to the transaction comply with relevant laws and regulations, such transactions are legal, and it is not illegal to pay a company's large electricity bill by credit card.