Assuming that your contract leaves you with copyright until you’re paid you could always have dmca’d them when they deployed. But that’s the vindictive side of me :D
To be clear, this is a strong second endorsement.
Why would this matter? If he's not paid, what validity does the contract have?
The question is really whether it is IP transfer on final payment or not. If the contract specifies IP is transferred only on final payment, then the developer keeps all IP until that point.
Now, something like building a website, it doesn't really make a whole lot of sense why this matters. If the person doesn't pay, they may not get the source code you've written, and they may not have the technical chops to deploy or use it. But think about a design agency instead.
Client hires a design agency to come up with a brand identity, logo etc. Client agrees to their standard terms - 50% upfront, remaining 50% on completion. They start work and come up with a few ideas. Client asks for a few changes, but they soon broadly settle on a design style. Before the agency gets to the point of completing all the deliverables, the client cuts off contact and does not pay. They're now in breach.
But, they think, we've got the logo, we don't need all the other stuff the agency were going to do. We're fine with the logo, and we're not going to pay. They can go to court, and the court might say "well, you paid 50%, you are entitled to the part performance before the breach". They might look at the design agency and conclude "they're not going to sue us, they're tiny and lawyers are expensive" and decide the risk of the breach makes it worthwhile.
There's also completely innocent scenarios you could imagine that lead to the breach: perhaps the working relationship breaks down. Perhaps the design agency don't answer the client's emails for a week and they refuse to pay.
But if the agency had 50% upfront AND IP transfer only on final payment, then if the company decide to reuse the work, they can't try and argue "well, part payment entitles us to part performance", plus you have a viable cause of action against them for breach of copyright violation in addition to breach of contract.
IP transfer on completion makes it clear what happens in the case of breach (which reduces legal uncertainty), and it increases the cost to the client of breaching, which hopefully has something of a deterrent effect.
In the monteiro talk he says that a lot of companies have default contracts for contractors, and say things to the effect of "it's just our standard contract there's nothing to worry about", IIRC he gives examples of contemporary contracts that require delivery on floppy disks. But also they try to have terms that essentially say all the work belongs to them, and you will be paid on completion.
e.g. if you don't finish the work - or they claim you did not (by applying feature creep offensively, etc). Then because you didn't finish they don't owe you money.
The other approach is that they fail to pay, you can't use (for example) the DMCA to pull down their site, or bring copyright violation suit against them because the IP already belongs to them. All you can do is sue for owed money but you don't have the leverage of stopping them using your IP, because it's not your IP anymore.
That is my understanding from his talk anyway - IANAL, and also I haven't done contract work myself (that's what my wife used to do, and she had a default contract produced by her own lawyer)
What does this mean? The contract is valid absent payment.
A contract has to have consideration for both parties to be a valid contract, but a promise of payment is a perfectly valid consideration and would make the contract valid.
The promise of payment is the consideration. A contract is literally an exchange of promises. When you go into a car dealership and buy a car, they are exchanging a promise (you get a car!) for your promise to pay them.
The refusal to pay is a failure to live up to the promise - that is what makes it a breach of contract. If not paying meant consideration didn’t exist, then nobody would be able to sue for breach of contract for non-payment. If breach meant the contract was invalid, you wouldn’t be able to enforce the contract.
The promise of payment itself is consideration. The refusal to honor that promise is the breach of the contract. The contract itself doesn't become invalid because one party breaches the contract. Again, such an interpretation would fully the entire purpose of contract law.
> you could always have dmca’d them when they deployed