First I do the "pre sales" for free, meeting with the customer and their team, get to know what exactly they need, how much time, signing an NDA and studying their current infrastructure if they're interested. I do this for free because it helps me understand if the customer has a good position and if the work makes sense for me.<p>Then I write the contract, usually separated in phases. Each phase has its own schedule.<p>For "short" contracts (like one or two months), I send an invoice after the first phase, with about 50% of the value. Then 50% after the work ends.<p>For longer contracts (6 months+), I divide the total cost between the months. So if a project is 10k for 5 months, I send an 2k invoice each month. Depending on the customer, if they don't pay in at least 5 business days after the invoice is sent, I stop working.<p>After the contract ends, I usually provide 30 days of email/chat support to answer questions (and not hands-on work).<p>This is working very fine for me, but sometimes things could go wrong, so having a good lawyer ready is great as others said in this thread.<p>Good luck!