When you're in business for yourself, a lot of your time is spent trying to negotiate higher pay, reduce your costs and otherwise find ways to improve your business economics.

And as your own boss, you might also spend a lot of your time trying to bring in the money you've earned. Companies take their sweet time, your importance to clients drops radically once you deliver what they want — and then there are the shameless jerks that ignore one statement after another and keep your money in their pockets.

In my time, I've learned many lessons about how to make sure I get paid. Here are some that, when regularly applied, will help improve your situation:

Choose the right client

I'm sure this point grates on many. Contractors or freelancers don't know a place is bad news until they don't get paid. But some workers seem to largely avoid the bad payers while others have issues with one client after another. It's important to do some homework.

Larger companies can often be slow in payment, but they're typically good for the money. Mid-sized companies also can be reliable and probably have assets that would make legal action and collections possible, if necessary. Smaller companies and individuals are where the problems often creep in. But no matter the size of the company, check reputations, and not just in a cursory Google search. Look for lawsuits that involve the company or executives. Check for sites where people might describe experiences dealing with the company. If the company treats customers or investors badly, imagine what it will do to a contractor. Consider paying for a D&B credit report on the firm to see its payment history.

Square away your contract

Freelancers are often so eager to bring in business that they don't take care of the mechanics, including contracts. You want a document that spells out the relationship, what you will provide, what they will pay, and when this happens. Have a lawyer create a general document that you can tailor for specific clients.

Here are a few clauses I've found helpful, in addition to the usual ones:

If the client doesn't pay within 90 days, you have the option to take legal action to collect and the client agrees that those costs will be added. Late payments past 30 days start accruing interest every month.

No ownership of any IP changes hands until you have received the final payment and it has cleared.

Set deadlines for acceptance of work at milestones. The client has a specific, reasonable amount of time to get comments back to you. If the deadline is missed, then the client has technically accepted the work done.

Be serious about being paid

You need to invoice on a timely basis. Have accounting software generate your invoices; don't use Google docs, emails or texts. Accounting software will be able to send in almost any format. Regularly check your accounts payable lists and use a receivables aging report to see how long invoices have been out.

Don't wait too long to get in contact about late payments. If your terms with someone are 30 days and 35 days go by, send a polite note asking why there's a delay. Talk to people in accounting who can tell you whether the proper person even bothered to send over the paperwork. And if a company isn't paying you, don't keep doing work for it. The work you are booking at that point is a fairy tale to make you feel better about how much you're scheduling that month.

Keep all copies of correspondence. Set up a folder so you can have all emails and other correspondence in one place.

Be ready to do something

Attitude and intent are vital. You have to decide that, without gratuitous anger, you will make sure you're paid. Identify a lawyer you can use, if necessary. He or she can do the heavy lifting for you if a client refuses to pay.

There is no way to guarantee that you'll never have a troublesome client. But if you take the right precautions and use proper procedures, the chances of losing what you are owed drop dramatically.