It is impermissible for a solvent person to procrastinate in the payment of a debt if he is asked to pay it back, for this is injustice to the creditor. The Prophet (peace and blessings be upon him) said, “Delay (in the payment of debt) on the part of a rich man is injustice” (ٍSahih Muslim). However, if the creditor has allowed him leeway in paying it back and he is quite comfortable with the delay, then one can go ahead and fulfill the commitment you has made in regards to the charitable contribution.
In his response to this issue, Sheikh Ahmad Kutty, an Islamic scholar said:
We must not be slack in paying back the debts we owe people; for unless we pay our debts in full before death, we will be tormented for such neglects in our graves. Our souls will not ascend to Allah, as is reported in the traditions.
Having said this, however, I should add this: If the debt you owe your relative is such that he has allowed you leeway in paying it back and he is quite comfortable with your delay, then you can go ahead and fulfill the commitment you have made in regards to the charitable contribution have pledged. For we are obligated to fulfill our pledges and commitments; but you need not do this right away, if the relative is expecting a repayment from you. If you are in doubt, then you should have a frank discussion with him about it, in order to make sure of his intentions. If you find he is OK with your delay, then you should fulfill the pledge. Otherwise, you can do it after you have paid back your debt that is outstanding. In Islam, it should be pointed out, Allah will not take us to task for something which is beyond our means or ability.