Always always always ask for a deposit. This keeps the riff-raff out, and prevents you from doing work for free.
People differ on whether it's 50% or some other percentage, but for fixed-price bids, I always do 50% before as deposit, and 50% after completion. For on-going work, minimize your exposure to non-payment so you can do weekly or biweekly invoicing and billing. That way, in event of non-payment, you've minimized potential losses.
For online-only work (where you haven't met the client face-to-face), you still should get a contract, and still do the same with deposits and all that.
Trust, but verify. Don't put yourself in a position to get screwed.
I've seen people use Freshbooks which allow invoicing and payments together, so you keep all that admin under one system.