Like most countries in the world Germany also has its own, special mortgage system with unique features. Most mortgages for expats – no matter whether they are registered as being resident in Germany already or not – are based on the annuity system.
Annuity stands for constant monthly or quarterly repayment installments, which consist of interest and principal (or capital) borrowed. By paying back the principal from the beginning, the borrower reduces their remaining mortgage with each installment. So with each subsequent installment a little bit less interest has to be paid. The saved interest is used for increasing the amount of principal repaid with each installment, which keeps the overall installment total unchanged. This approach results in an ever-increasing reduction of the mortgage balance owed over the months and years.
In principal the repayment installments remain constant for the whole period the borrower has fixed their interest rate for (most borrowers go for 10 years, but other periods are also common). Once the period of the fixed interest rate has expired you can repay all or part of the remaining mortgage penalty-free. You can only repay the mortgage early if you sell the property or upon goodwill of the lender.
Nobody can know at present whether there will be a penalty at that point and if so how much it will be. Usually the lender takes the interest portion of each remaining mortgage installment and compares it with the interest they would get for the same amount on an alternative investment in the capital market for the same individual duration of each payment. If the return of the alternative investment is higher the lender stops as there is no reduction on their return.