Will I get my car finance deposit refunded?

Hi all, I placed a deposit on a car (£7,000) and financed the rest. The finance was all approved however the car when we went to drive was in poor condition (wobbly mirror, warning light etc) and I told the garage I no longer wanted the car as it was in a sub par condition. However I’ve been told by a friend car deposits aren’t refundable. I sent the deposit to the dealer, am I entitled to get this money back? It’s making me feel sick I could’ve lost this money. They said verbally they’d refund me however I’m worried sick they will find a way to get out of it returning the deposit to me.