Taking a down payment or deposit

For us (construction company), we just need the ability to accept the deposit and then send the invoice again once certain amount of work has been completed for each Milestone until project completion. So for example, contact value is $50k. We require a $10k deposit upfront. The tensing $40k is payable as $10k for each Milestone #1-#3, and final $10k upon pricy completion