What we understand from your question is that you are going to rent a house for one year, and pay 20,000 in advance, and in return for that the landlord will reduce the rent from 1000 to 500 dirhams, in return for his being able to benefit from the money that is paid in advance. If this money that you paid in advance will be returned to you at the end of the period, then it is regarded as a loan given by you to the landlord, and it is a riba-based loan because it brings you a benefit, which is the reduction of the rent from 1000 to 500. It is as if you are lending him 20,000 so that he will give you back 20,600. The fuqaha’ are unanimously agreed that every loan that brings a benefit is riba.
Imam Ibn Qudaamah (may Allaah have mercy on him) said: Every loan in which it is stipulated that more should be paid back is haraam, with no difference of scholarly opinion. Ibn al-Mundhir said: They are unanimously agreed that if the lender stipulates that the borrower must pay back more or give a gift, and he gives the loan on that basis, then this extra payment is riba. It was narrated that Ubayy ibn Ka’b, Ibn ‘Abbaas and Ibn Mas’ood forbade loans that bring benefits, because lending is a contract based on kindness and an act of drawing closer to Allaah. If he stipulates a condition that more must be paid back, that goes against these principles. End quote from al-Mughni (6/436).
The stern warning against riba is clear to you; it is a grave major sin and the one who does it is addressed with a threat of war from Allaah. Allaah says (interpretation of the meaning):
“O you who believe! Fear Allaah and give up what remains (due to you) from Ribaa (from now onward) if you are (really) believers.
279. And if you do not do it, then take a notice of war from Allaah and His Messenger but if you repent, you shall have your capital sums. Deal not unjustly (by asking more than your capital sums), and you shall not be dealt with unjustly (by receiving less than your capital sums)”
And Muslim (1598) narrated that Jaabir said: The Messenger of Allaah (peace and blessings of Allaah be upon him) cursed the one who consumes riba and the one who pays it, the one who writes it down and the two who witness it, and he said: they are all the same.
And the Prophet (peace and blessings of Allaah be upon him) said: “A dirham of riba that a man consumes knowingly is worse before Allaah that thirty-six acts of zina.” Narrated by Ahmad (21450) and al-Tabaraani; classed as saheeh by al-Albaani in Saheeh al-Jaami’, no. 3375.
We ask Allaah to guide you and to make you independent of means with that which is halaal so that you will have no need of that which is haraam.
And Allaah knows best.