All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
If the actual charges of repairing the door were two hundred dollars and you had agreed on that amount with your friend, but he gave up fifty dollars later for you, then there is no harm to inform the owner that the charges were two hundred dollars and you may take the fifty dollars. It is a gift for you from your friend. However, if it was possible to hire a person who may repair the door for one hundred and fifty dollars then you are not allowed to take the fifty dollars from your owner. Similarly, if you had initially agreed on one hundred and fifty dollars then you are not allowed to take that fifty dollars since, in this case, you are an agent of the owner.
Allaah Knows best.