The three-month cap (§ 551 BGB)
The base is the net cold rent without utility prepayments. Anything above three months' rent is invalid to that extent — you can reclaim the excess, even during the tenancy and even if you already paid it.
Instalments and interest are mandatory
You may pay the deposit in three equal monthly instalments, the first due at the start of the tenancy. The landlord must keep it in a separate interest-bearing account — the interest is yours. Neither right can be excluded by the contract.
This checks the amount — your contract holds the details
Whether your specific deposit clause is validly worded, whether an additional guarantee is demanded, and what applies to repayment after moving out is written in your lease. Upload it to Lucid for free — the deposit clause is checked against the law along with every other clause.