He won't be trusted with sensitive projects that he doesn't get paid for.
It would be defined in the contract, but usually the contractors never own the copyright to code written for other people.
Anyway, I agree with the other comments that this is unprofessional and immature. We have a civil court system to deal with these kind of issues.
Lawyers say the legal system has its limitations and that not every morally legitimate gripe has a legal remedy.
Your comment reminds me of the typical objection, why crackdown on these evildoers instead of these worse evildoers? Why not both?
Under the terms of the contract that's now void due to non-payment?
The guy who promised to pay is breaching the contract by not paying, and the contractor's recourse is to sue him in civil court for the money.
It sounds very much like this was a freelancer creating a product, not a contractor providing work.