His father gives him money for his university expenses, then there is some extra money left over; is it permissible for him to take it?
Question

                My father recommended that I go to a particular university at a cost of forty thousand per year. After some research, I found another university that is as good, for twenty thousand per year. I suggested this university to my father and he agreed, then I agreed with him that if we kept to the original agreement, we keep to forty thousand, and he did not object. So I will pay twenty thousand to the university and I will add the other twenty thousand to my own money, and he agreed.
But the problem now is that the university sometimes costs eighteen thousand or twenty thousand  – according to the number of hours for which one registers – and I always take twenty thousand, because this is the usual amount, and eighteen thousand is the exception, and my father does not care much.

My question is: do I have the right, based on the previous agreement between me and my father, to keep the extra one or two thousand sometimes, or is it not permissible for me to do that? If I keep it, is this haraam money?
Praise be to Allah.
    You should understand that being prudent and keeping away from that which is 
    dubious, and always trying to be on the safe side with regard to matters of 
    halaal and haraam, is a wise approach and proper conduct, which is enjoined 
    by Islamic teaching. The Prophet (blessings and peace of Allah be upon him) 
    said: “Whoever guards against the doubtful matters will protect his 
    religious commitment and his honour, but whoever falls into that which is 
    doubtful will fall into that which is haraam, like a shepherd who grazes his 
    flock around prohibited land; he will soon graze in it.”

    Narrated by al-Bukhaari (52) and Muslim (1599). 

    And he (blessings and peace of Allah be upon him) said: “Leave that which 
    make you doubt for that which does not make you doubt.” Narrated by at-Tirmidhi 
    (2518) and an-Nasaa’i (5711), at-Tirmidhi said: This is a hasan saheeh 
    hadith. It was classed as saheeh by al-Albaani in Saheeh at-Tirmidhi. 

    ‘Umar (may Allah be pleased with him) said: We used to refrain from nine 
    tenths of that which is halaal for fear of falling into that which is haraam.
Abu’d-Darda’ 
    (may Allah be pleased with him) said: Part of perfect fear of Allah (taqwa) 
    is caution regarding an atom’s weight, to such an extent that he will 
    refrain from some of that which he thinks is halaal for fear that it may be 
    haraam, so that it will form a shield between him and the Fire. 

    What appears to be the case from what you say is that your father is giving 
    you a certain amount of money to cover your study expenses, and so long as 
    he is doing that, you should use this money for the purpose of study. If 
    there is anything left over from it, then you must tell your father that 
    some of this money is left over. Then if he asks you to return the extra 
    amount to him, you have to return it to him, but if he lets you off, then 
    this money is halaal for you. 

    The ruling is like that because what appears to be the case is that your 
    father is only giving you this money as a gift on condition that you use it 
    to pay for your studies. If a gift has a condition attached to it, then 
    attention must be paid to the conditions stipulated by the giver. It says in
    Asna’l-Mataalib (2/479) by Shaykh Zakariyya al-Ansaari (may Allah 
    have mercy on him): If he gives him some money and says “Buy yourself some 
    headgear with it, or go to the public bath” and the like, then he should 
    dispose of it in that manner only, in accordance with the wishes of the 
    giver, whether he intended that he should cover his head with the headgear 
    or clean himself by going to the public bath, because of what he saw of him 
    having his head uncovered or looking scruffy and dirty. But if he did not 
    intend that, and he only said it by way of general talk, then he does not 
    have to use it for that purpose; rather it becomes his property and he may 
    dispose of it however he wishes. End quote. 

    Shaykh Sulaymaan ibn ‘Umar al-Jamal (may Allah have mercy on him) said: If 
    he gives him dates with which to break his fast, then he should use them for 
    that specific purpose, and it is not permissible for him to use them for any 
    other purpose, based on the intention of the giver.

    End quote from Haashiyat al-Jamal ‘ala Sharh al-Manhaj (2/328) 
If 
    your father did not mind about leaving this extra money with you and you 
    have siblings, then he must give your siblings the equivalent of the extra 
    money that he gave to you, because the most correct scholarly opinion is 
    that it is haraam to differentiate between one’s children (with regard to 
    gift giving) unless there is a valid reason for singling out one of them and 
    giving him more, as we have explained in fatwa no. 
    178463

    And Allah knows best.