Deductions & credits

So if you still owe on the debt, you can’t write off the debt for the credit? It has to be paid in full in order to receive the credit?