How best to handle private investor?

I’ve recently been coming across more private lenders that are interested in my deals. In the past, I’d basically just work things as, “You write me a check, I’ll invest it, I’ll write you a check when we cash out.” I want to start getting things more official and formalized. What are some good recommendations on how to handle private investors’ money? Thanks.

Dean