33% of payment on project start, 66% of payment on demonstration of final product, 100% payment on hand over.
Worst case you get 66% of your payment. Make sure 66% is enough to make the project profitable.
Clear contracts are also important. Fuck you, pay me.
I know, right? Needs more tab.