First of all, you need to figure out whether it is a deposit or a down payment. The deposit is the money paid in advance to buy a car. If you buy a car, the deposit will be offset against the car payment. If you don't buy it, it can be refunded. The deposit is an agreement. If the two parties agree not to go back on the contract, the buyer will not be required to return the deposit if he breaches the contract. If the seller defaults, the buyer can demand double the return of the deposit.
There is a big difference between a deposit and a down payment. You must know which one you are paying. If it's a deposit and you haven't signed a contract, then you can ask for a refund. If they don't refund it, you can complain to the consumer association.
As for credit cards, you can call the service hotline of the bank where you issued the card, get through to a human and explain why you want to cancel. If the transaction fails, the bank can usually cancel it for you, because you don’t have Consumption success.