Not have a leg to stand on

To have no good proof or excuse for something, to have no good evidence or defence to offer someone.

“The company does not have a leg to stand on if they refuse to pay the money that they owe you.”