Updated

It may be tempting in the middle of a market meltdown to stash your cash in your mattress instead of investing it in the stock market. But if you want to buy a home, you may not be able to use that cash for the down payment.

A majority of consumers ( 57%) say they keep their cash savings in a bank, according to a 2015 financial survey from American Express, but more than half (53%) also say they keep their cash at home in a secret location.

Still, when you're closing on a home you're not going to be able to come to the settlement table with duffel bags full of Benjamins like Al Pacino in Scarface.

Lack of verification of income or assets is one of the biggest reasons contracts fall through, said Scott Alexander, operations manager for Assurance Financial, a Baton Rouge, La.,-based lender.

Only a cashier's check from a bank will work. "Cash on hand is unacceptable nowadays. No title company is going to accept (physical) cash as funds at the close," Alexander said. Even if the money has been stuffed under a mattress, "the mortgage company is going to have big doubts about where that money came from," he said, and will treat it as if it was gained illegally.

In fact, because real-estate agents are increasingly on the lookout for money laundering, even just bringing cash to the settlement table can trigger a real-estate agent to file a Suspicious Activity Report with the U.S. Treasury Department's Financial Crimes Enforcement Network or (FinCEN).

FinCEN noted in a 10-year study of Suspicious Activity Reports between 1996 and 2006 that 20% of residential real-estate transactions flagged as suspicious contained evidence of money-laundering.

Even having a mortgage pre-approval letter from a lender won't help you if the bank can't determine a legitimate source of the cash, Alexander said. A pre-approval letter only shows that there is sufficient income and assets and credit to support a loan, says Alexander. "We don't really know for certain until the due diligence is submitted to the underwriter," he said.

Mortgage lenders, as part of the Secure and Fair Enforcement for Mortgage Licensing Act or SAFE Act of 2008 and increased safeguards on so-called "stated income" loans as part of the Dodd-Frank financial reform law of 2010 , now must account for every dollar used in a residential mortgage transaction.

In addition, the Patriot Act of 2001 put added restrictions and reporting requirements to prevent terrorist groups from laundering money through real-estate transactions.

Not only must cash savings be deposited in a bank account to be part of asset calculations, it has to stay there for at least 60 days so that mortgage lenders can account for the cash through at least two bank statement cycles, a process lenders called "sourced & seasoned." Cash gifts from relatives must be documented too; otherwise, they can be considered an undisclosed loan which could impact your all-important debt to income ratio.

"Someone who's planning on buying a home with a mortgage should get the money into the bank as quickly as possible," said Joe Parsons, senior loan officer with PFS Funding in Dublin, Calif. If you do, expect your bank to file a Currency Transaction Report, or CTR, to the IRS with your personal information and the amount of the deposit.

Even if you try to slip a large amount of cash through the bank in small amounts, under federal regulations the banks will consider that a "layered" deposit, where a large amount of cash is being deposited over time to get under the legal limits of anything over $10,000 and flag the IRS regardless, said Assurance Financial's Alexander.

Still, about 5% of his company's 3,000 annual mortgage loans have so-called "mattress-money" issues, which can get worked out, so long as you let your lender know earlier enough in the home buying process, Alexander said. But remember: Large cash deposits must be made at least 60 days before you start the home buying process and at least two months before you even sign a contract, he added, as the bank will only begin its due diligence after the contract is signed.