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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
There is no impediment that a man punishes himself with a financial penalty for the sins he commits, as did Ka‘b ibn Maalik when he gave up his property as charity to Allaah and His Messenger, sallallaahu ‘alayhi wa sallam. It is narrated in both Saheeh's, and the wording is Al-Bukhari’s, that he said: “Part of my repentance is to give up all my wealth as charity to Allaah and His Messenger.” The Messenger of Allaah, sallallaahu ‘alayhi wa sallam, said: “Keep some of your wealth, as it will be better for you.”
Pay no attention to your feeling that you have abandoned sins out of fear of giving in charity only, because to leave sins is better for you at any rate. Moreover, what has led you to commit yourself to pay the above-mentioned sum is your fear of falling into sins, and it is your fear of Allaah Almighty that developed the fear of committing them within you. The real motive behind all this is your fear of Allaah. So pay no attention to satan’s whispers and malicious ways of deception, and proceed on your path.
Allaah Knows best.