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.
It is an obligation to give the money to whomever the donor donated it for, and if you are unable to give this money to the people who deserve it, and unable to give it back to its donor, and you had donated it while intending the reward for them, then this is sufficient Inshaa’ Allaah. However, if you had donated it indenting the reward for yourself, then in this case, you should donate an amount of money that you predominantly think is not less than the amount that you collected with the intention of donating it on behalf of the owners of the money.
Finally, we advise you to always seek the forgiveness of Allaah and perform good deeds as much as possible. It should be noted that you are not sinful if you did so before you became pubescent.
For more benefit, please refer to Fataawa 86527 and 84737.
Allaah Knows best.