Here’s a couple of posts from a few months ago.
To answer your question, yes you can originate a note on a home you sell and collect as well. This is what is known as “captive finance”, I believe.