Jammie pants and slippers. Dog curled up at your feet. Your favorite TV show playing in the background. Sound like a quality weekend day? Not so fast. For a growing number of Americans, it’s what a regular ‘ole workday looks like.

We’re not necessarily talking about a work-from-home scenario (although this is another growing workforce trend). And it goes beyond having flexibility to work from wherever you want (and wear whatever you want!). It’s self-employment, and it’s on the rise. FreshBooks’ second annual Self-Employment Report found that, “Some 27 million Americans will leave full-time jobs from now through 2020, bringing the total number of self-employed to 42 million,” said the New York Post. “The report defines self-employed professionals as those whose primary income is from independent client-based work.

But self-employment can also make it difficult to buy a home. “Lenders are primarily concerned that all applicants, including self-employed workers, have the ability to consistently repay the mortgage,” said U.S. News & World Report. “They’ll need to see that your income is high enough to pay for the mortgage and likely to continue, and that you have a good track record of repaying your debts.”

These tips can help you get yourself in a better position.

What do you need to show?
Showing two years of steady income is a basic requirement for just about any mortgage, but those who have an employer other than themselves may have more flexibility. Other factors, such as income, savings, down payment, and debt-to-income ratio can make that two-year rule less critical.

Those who are self-employed, however, will want to show as much income history as possible. “Mortgage lenders typically require self-employed individuals to show two years’ worth of self-employment income to prove that they have a steady revenue stream,” said The Motley Fool. In addition, “You’ll have to provide tax returns from the last two years, and you may also have to provide a list of your existing debts and assets. Business owners may have to provide profit and loss statements from the last couple of years.”

How to treat business expenses
Adding to the challenge is the fact that lenders are going to be looking at your income after deductions. “Self-employed workers also might write off a significant portion of their income as a business expense, minimizing the size of the mortgage they’re able to obtain,” said U.S. News. “Because mortgage underwriters typically look at income after expenses, your taxable income may be too small to qualify for the mortgage you want.”

Managing your debt-to-income ratio
“Most mortgage lenders will not give you a loan if that ratio is greater than 43%—that is, if more than 43% of your income is going toward paying off debt each month,” said The Motley Fool. That debt-to-income level is key in any mortgage approval scenario, but takes on added importance when everything is under a self-employment microscope.

“It’s important to make sure you keep your debts down to a manageable level. They should never exceed 43% of your income, and it’s best if you can keep your obligations under 36%,” they said.

How’s your credit score?
Credit scores are even more important if you’re trying to prove you’re worthy of being approved for a mortgage. “Even if you’ve been wildly successful after striking out on your own, having a lousy credit score will hinder your chances of getting a good rate on a mortgage,” said Bankrate. They recommend checking your credit before you start applying, which will give you an opportunity to pay down debts or spot errors on your report that could be dragging your score down.