Some mortgages have prepayment penalties written into them. This means you will have to pay the lender a percentage of the principal, or some other stated amount, if you decide to repay the loan early.