No, IP ownership transfers when your contract says it does. If you're a consultant and your contract says you transfer IP upon payment, then sure, that's the case. But if you're a salaried employee, then most likely you've signed something that stipulates that your product is a work-for-hire, and it becomes owned by your employer the moment you type it out.
So I suggested one kind of contract to write which would ensure payment of that sort, rather than the usual.