You take them to court. Try to go to small claims. I've got a suit against someone for non-payment I filed 10 years ago - it's still on the court backlog - but it was too large for small claims.
And then you learn to spot warning signs, and avoid clients/projects like that again in the future. Getting some deposit up front is often a good thing, but also not something you can always manage. I've done work for govt agencies - that's generally not going to happen, but once I have a contract or PO, I've got a pretty high confidence the money will come through - it just may take weeks or months to get paid.
In my experience the vast majority of businesses will not entertain the idea of cash up front, period. I bet that you wouldn't either. If you were building a house, and the builder demanded cash up front, you'd laugh in his face.
Finding good clients is important, but if you demand to be paid in advance, get used to waiting those tables because you're going to be doing it a long time. Note: you will not be paid in advance for waiting those tables, either.
This is 100% untrue. I’ve been a freelancer for 11 years and I’ve coached literally hundreds of others. I never, ever work with a new client without getting at least 25% upfront. Never. It’s 50% if the contract is smaller than $20k. And I also never really get any pushback. By the time we’re talking payment terms, they’re sold.
If you’re doing work for clients upfront without a deposit, you are taking a huge risk. Which is probably why out of more than $2 million billed, I’ve only had a single client not pay me, and that was a startup that went under completely.
This could be something built into the hypothetical framework I mentioned. As in, the default quoting template for your industry has x% upfront payment terms, and you deselect that option after a strong warning. All my quotes asked for 20% up front but then I almost never bothered invoicing it until I was finished, so I would need something that auto-invoiced the 20% when the client clicked "Accept Quote"... ;`(
Then the time-tracking component would strongly warn against commencing work until the invoice was paid, etc.
So, basically, a very opinionated business framework web app.
I typically require a deposit and set a payment schedule although I'm doing most of my work on UpWork now. UpWork is nice because they handle all the billing and payment hassles and I get a weekly transfer to the account of my choice. It's worth the 5% cut.