Preface and Caveats
The question doesn't specify where this happened. I am providing an outline of the way that most U.S. states would handle this situation, if the fats are as they are much more likely to be and not as claimed in the question probably due to a misunderstanding of the underlying transaction. I identify areas where state laws most often vary and don't describe those areas of the law in detail since that is impossible without knowing where this happens.
This is a matter of state law and varies from state to state, although most U.S. states are quite similar until you get to the fine details. Atypical language in the contract between the contractor and the client could also lead to a different conclusion.
I don't know how this would be resolved in a non-U.S. jurisdiction.
Background: The Structure Of A Typical Construction Loan Financed Construction Project
In business and contractual disputes you can only understand the answer if you understand the underlying business transaction, which the question itself doesn't spell out very fully.
The fact pattern identified in the question is so unusual that I strongly suspect that there is a misunderstanding of the facts, or an inadvertent misstatement in the language used in the question due to sloppy writing that flows from not appreciating the importance of some key facts.
The transaction was almost surely structures more or less as follows (for background, I'm presenting a more general very of this kind of transaction rather than the simple one with no subcontractors or material suppliers involved, because this context helps someone understand why the laws are written the way that they are written.)
Usually, the client owns real property, takes out a construction loan from a bank secured by the real estate, and hires a general contractor.
The client will usually make some down payment to the general contractor who will take care of paying the subcontractors and material suppliers, and will pay the balance of the amount due to the general contractor through proceeds of the construction loan disbursed by the bank which are drawn as the work is done and payment is earned.
Typically, each drawn cycle, which is often monthly for a smaller project and weekly, biweekly or semimonthly in a larger project, materials suppliers and subcontractors submit invoices and lien waivers to the general contractor based upon the work done. If the work is complete, a complete lien waiver is submitted, if he work in only partially finished, a partial lien waiver is submitted.
The general contractor substantively reviews the invoices based upon a physical review of the construction site and a review of the subcontract. If there are problems it is rejected and must be resubmitted by the material supplier or subcontractor. If it is approved, the general contractor attaches that invoice as a supporting document to a draw request for the draw cycle summarizing all validly submitted invoices from material suppliers, subcontractors and itself, and also attaching a partial lien waiver from the general contractor. Then, the general contractor submits that draw request to a bank officer handling the construction loan as an agent of the property owner-client, and also a client representative for approval. The bank officer and client representative make a much less probing review of the draw request, looking only for obvious irregularities or suspicious amounts, and if everything is in order, they approve the request. Then, the bank write a check in the draw amount approved to the general contractor. The general contractor then disburses the invoiced amounts to the materials materials suppliers and subcontractors and pays itself the amounts that it has earned.
Sometimes, however, the general contractor gets a valid invoice from a material supplier or subcontractor, and receives funds from the client in the form of a downpayment or a loan draw, but doesn't pay the subcontractor or material supplier with those funds.
Also, sometimes, the general contractor does work that it is entitled to be paid for or incurs an obligation to a material supplier or subcontractor, but the client doesn't pay or the bank doesn't disburse the funds requested even though the request is valid.
When a general contractor, material supplier or subcontractor doesn't get paid for work that is actually done at a particular piece of real estate, the law gives the firm that wasn't paid for its work on that particular piece of real estate what is called a mechanic's lien encumbering that piece of real estate. The details of how a firm with a mechanic's lien gives notice to the world of its rights, the priorities of lien's vis-a-vis each other, and the way that mechanic's liens are enforced varies significantly from state to state. But typically the notice must be given very promptly and not long after notice of non-payment is given, a lawsuit to foreclose on the real estate encumbered by the lien is commenced.
An unpaid material supplier or subcontractor, in addition to its lien rights, can also sue the general contractor for breach of contract, and sometimes also for misappropriation of disbursements from the client or the bank. An unpaid general contractor, in addition to its lien rights, can also sue the owner of the property for breach of contract.
The Facts In The Question and Analysis
The first paragraph of the question tells us what went wrong. The client paid an employee of the general contractor (probably a project manager) instead of the firm the employee worked for (basically embezzling the money by deceiving the client into thinking that the employee was authorized to receive a payment to the employee's firm on its behalf when that wasn't the case), and the firm of the employee who was paid now wants to get paid.
This happens and lawsuits usually follows when it does. But exactly what happens next depends upon the facts in the next to paragraphs. The next two paragraphs of the question, however, are probably confused and incorrect. The next two paragraphs say:
Two weeks later, the client received a letter from the contractor's
lender asking the client for money owed to the contractor, saying that
if it was not paid, the client could be double charged.
Does the client owe the contractor's lender?
What probably actually happened is that the finance office of the contractor submitted a draw request to the bank officer in charge of the client's construction loan with the bank, and also gave a notice of the draw request to the client.
The client tells the bank officer not to approve the draw request because the client has already paid the draw request directly to the employee of the contractor (probably the project manager) without the knowledge of the firm the employee worked for.
What Happens Next If The Facts Are As I Believe Them To Be?
When this happens, the finance officer at the contractor firm talks to the client figures out what happens and then talks to the employee to whom the payment was made. If the employee promptly turns over the funds the the contractor firm, the finance officers at the contractor firm scolds the employee for screwing up the system and the client for making a payment to the wrong person and there is no harm, no foul, and the matter is over.
But if the employee who took the client's money doesn't turn over the money which the client can prove to the contractor firm that he paid to the employee, several things are likely to happen.
The client will direct the bank not to pay the draw request.
The employee who took the money from the client is fired (no big deal, he was probably long gone).
The contractor firm and/or the client will often, but not always, report to the police that the employee embezzled the funds from the client, and if the police find it credible, will issue an arrest warrant. The main reason not to do so is that the facts are uncertain enough that the police and prosecutor don't want to touch it (e.g. the client paid the employee in cash and didn't get a receipt, or the employee when asked says that the payment was made but was a "tip" or was payment for something unrelated), or the client and/or the contractor firm don't want to harm their reputations by making public the fact that there was a theft on this job.
Three lawsuits could be brought, although, in practice, these might be consolidated as claims against different parties and cross-claims between defendants, in a lawsuit brought by the contractor, or in some other configuration.
The contractor firm sues the employee who took the money for converting money from a client intended for it (probably both as a tort and as a breach of fiduciary duty by an agent of the construction firm).
The contractor firm sues the client for breach of contract. The question is about the liability of the client in this second lawsuit. The client might also bring a counterclaim against the contractor for negligent supervision of its employee if the employee did indeed abscond with the money and the facts support that counterclaim. If the client prevailed on that counterclaim, the judgment on the counterclaim for negligent supervision (e.g. if the contractor knew that the employee had a history of doing things like this and didn't warn the client) would be setoff against the breach of contract judgment, rather than being a defense to the breach of contract claim.
The client sues the employee for fraud, conversion or theft.
What Are The Rights Of The Parties In These Lawsuits?
In the second lawsuit, the client has breached the contract. The contract said to pay the firm, the client paid someone else, and so the obligation under the contract was not satisfied.
The disputes in the lawsuit between the contracting firm and the client will be over whether the employee had apparent authority to accept the funds as an agent of he contracting firm, over whether the payment that the client says was made to the employee was made at all, and over the purpose of the payment if a payment was made to the employee but the employee claims that it was a "tip" or a payment for something else (e.g. the employee also had a catering side hustle and the employee says it was for catering services).
The issue of whether the client made the payment at all may be hard to prove if the payment was made in cash and the employee didn't provide a receipt and will come down to the credibility of the client and employee's testimony at trial. if the payment was made with a check or credit card, bank records will make it an open and shut case on that issue that will probably not be disputed at trial.
If the facts reveal that the employee had apparent authority to accept the funds from the client for the contractor firm and that the payment was for work on the project and not something else, then the the payment made by the client to the employee satisfies the client's duty under the contract even if the employee wasn't actually authorized to receive the funds for the contractor firm. So, the client wins and the contractor firm's sole remedy is to sue its employee for misappropriating the client's funds.
On the the other hand, if the employee did not have apparent authority to accept the funds from the client, or the payment was for something other than work on the project, or the client fails to prove that the payment was ever made, then the client owes the money to the contracting firm and must pay the contracting firm for the amount due (plus interest, litigation costs and possibly attorneys' fees depending on the terms of the contract). The client may pay that obligation out of separate funds of the client's own, or may authorize a the bank officer to make a draw on the construction loan to pay the amount owed.
The construction loan bank of the client wouldn't sue the client or demand payment from the client for the amount that should have been paid to the contractor firm but was instead paid to the employee. It didn't pay money to someone it shouldn't have paid it to unless the client authorized the bank to do so. And, the bank won't pay the contractor without the client/borrower's say so.
If the client authorized a draw payment from the construction loan to the employee rather than the contractor firm, the client still owes the bank for what it paid to the employee at the direction of the client (in addition to all other draws on the project), although the client may have a suit against the bank officer for negligence in administering the loan by failing to flag that the payee was wrong (which might lose but isn't a sure loss). The amount owed to the contractor firm proceeds under the analysis set forth above.
What If The Facts Are Right?
If, improbably, the facts as stating in the question are actually what happened, the client will owe or not owe the contractor money under the same analysis as above.
But the client will not have liability to any company that the contractor got a loan from (which would not encumber the client's real estate), since the client has no contractual relationship with the contractor's lender.
Post-Script On Double Payment Prevention Laws
The question hinges on the unfairness of the client having to possibly pay twice for the same construction work. In some situations, where the general contractor firm is at fault for causing the double payment to happen, the law protects the client from double payment, even though those laws don't apply here. I explain why these laws don't apply below.
Basically, the client has to eat the double payment when the double payment occurs because the client screwed up though no fault of the general contractor and the general contractor doesn't benefit from the double payment.
Some states have laws designed to prevent property owners, often only residential property owners having work down on their own residences, from having to double pay for work done in some circumstances.
But these laws usually only apply when the client pays the general contractor firm as the client is supposed to, satisfying his contractual obligation, and the general contractor doesn't pay the subcontractor, causing the subcontractor to sue the general contractor for breach of contract and the owner to enforce the subcontractor's mechanic's lien.
In those situations, the double payment prevention law eliminates the subcontractor's mechanic's lien rights when the client pays the general contractor in full, and the subcontractor is left only with a lawsuit against the general contractor who didn't pass on the client's or the client's bank's payment to the general contractor for the subcontractor's share of work to the subcontractor.
In this case, the double payment laws usually wouldn't apply because the legal issue here is whether the client paid the contractor, or was deceived by the employee into paying someone other than the contractor in an act of conversion/embezzlement/fraud.