Business is business, friendship is friendship. Don't mix them up.
You do the work for him. You get paid from him. Simple as that.
The things you need to do? Get him sign a contract which states the rate, how much time you work every week, when you get paid after delivery, etc. Insist on him signing the contract before continue the work.
If you don't get a contract before continuing, I am afraid you'll lose both the pay/time and the friendship. Many small business/startup run by friends failed the way you described in your question.