The definition that makes a loan non-QM
A qualified mortgage is a category the CFPB defines under Regulation Z. To meet the general definition, a loan has to avoid certain features (interest-only payments, negative amortization, a balloon payment), keep its term and its points and fees inside set limits, price within a set spread of comparable loans, and be underwritten with your income and debts considered and verified. A lender that makes one gets legal protection on the ability-to-repay rule. A loan that misses any part of that, and fits none of the narrower categories the rule sets out for certain smaller lenders and seasoned loans, is non-QM, and the lender does without the protection.
You still have to show you can repay
A non-QM loan on a home you live in is covered by the same federal ability-to-repay rule as a conventional or FHA loan. The lender has to make a reasonable, good-faith determination that you can repay it, from third-party records, and the rule itself lists bank records among the ways income can be verified.
Reasons a file can be non-QM
Income that is real but documented by bank statements or assets rather than tax returns. A bankruptcy, foreclosure or short sale more recent than agency waiting periods allow. Debts that run above agency limits against your income. A loan with interest-only payments. A foreign national, or a borrower who files taxes with an ITIN and whose file the agencies' residency rules do not reach. A property type the agencies will not take. Each is a different lender and a different conversation, which is why the reason matters more than the label.
Investor loans are a different case
A loan on a rental you do not live in, made for a business purpose, is outside Regulation Z altogether rather than on the wrong side of the qualified-mortgage line. That is the DSCR loan, qualified on the property's rent, and it can carry a prepayment penalty where a non-QM loan on your own home cannot. The rules treat the two differently, and the difference shows up in what you sign.
Where it is not the answer
A file that fits agency rules. If your tax returns show the income, your credit history clears the agency waiting periods and the property is ordinary, a conventional or FHA loan costs less for the same work. Self-employed income with returns that show it is normal conventional work, not a reason to go non-QM.