And, to answer the question what steps to do when they don't pay: not much you can do other than asking. There aren't any worthwhile legal resources for businesses or freelancers to be paid.
However, to not get there, make sure the payment schedule covers your work hours including profit and if they don't respect the schedule, stop working and mention there will be a delay in delivery. As he said, choosing well your client by avoiding people who are too difficult from the start usually avoids the worst kind of clients. As soon as your guts sees a red flag, don't ignore it and walk away. Your instinct is rarely wrong when sizing trustworthiness.