I only recently started doing contract work, and the first few times have been pretty smooth, but it occurs to me that handing someone a repo with working code in it with instructions is a bit naïve. What solutions do you use to prevent full use without full payment?
Payment before delivery works. Either bill hourly and stop working if they stop paying... or bill by the project with 50% down, 50% at delivery. Or whatever percentages you negotiate.
But handing over a working repo with instructions is actually a decent way to go once you are paid. Otherwise you are on the hook for actually running the thing, too, which is a completely different ballgame.
There are the dongle solutions, each unique and keyed, but has a cost. There are the 'phone home' solutions, but if your product is good and gets share = attracts hackers who figure it out. Game people fight a constant battle = steam servers, essentially a mandated phone home cloud. You can add a few backdoors with a mechanism that scatters them with many entry points that each send a 'canary in a coalmine' alert = you know, but nothing is hacked. Once known, the canary can be used as trigger for unpaid product.
Not sure how legal that is, but there are people who create software security methods dongles, cloud servers, canaries etc - google that and ask and assess the cost/benefit ratio. Some just tolerate the problem and their only solution is an update gatekeeping method. Reasonable price is also a good plan for a large base = $$ in numbers...
But handing over a working repo with instructions is actually a decent way to go once you are paid. Otherwise you are on the hook for actually running the thing, too, which is a completely different ballgame.