Damaged walls - What am I liable for?

Hi all

My flatmates and I have damaged 1 wall (there is a nail in it) in one of the bedrooms of the flat we were renting.
Upon end of the contract, the landlord has redone the coating and repainted the whole room (all 4 walls) starting from the damaged area and presented us with the full bill. Is he allowed to do that or are we liable only for the repairs to the damaged wall?

Thanks

without seeing it ,its hard to make a coment

It’s a very small nail kind of in the middle of the wall. You can definitely see the little hole and we obviously took responsibility for that. But what about the rest of the room?

I would contest it. Did you take a picture ? Just one wall could have been painted , maybe in a different shade