When you divorce or legally separate, you and your spouse sign a document called a marital settlement agreement. The term might be different depending on the state in which you live. In that agreement, you and your spouse reach a settlement to divorce or legally separate, resolving any disputes and dividing up any assets and debts.
In your agreement, you accepted responsibility to pay a debt that was not in your name. This is not unusual. Maybe your ex agreed to sign over the title to a vehicle or other property, and in exchange, you would pay off some of the debt in her name.
You also state your name was on the account, but she was able to remove you from it. That's where this gets interesting. Your ex filed bankruptcy, which means she wiped out her liability to pay on this debt. If the account is not in your name and she has no obligation to pay on the debt, neither do you. Period.
The creditor probably has no idea you guys were married, and the creditor has no idea about your divorce settlement. Unless the creditor has your Social Security number, it would have no way to know you exist.
You need to confirm a few things before you can take this position and stop sending out a payment on this debt.
Are you certain your name is no longer on the account? This entire discussion is irrelevant if you are personally liable for the debt. You could still be liable to pay the entire balance even if she filed bankruptcy.
Did you sign on the credit card contract? Maybe you called the creditor a long time ago and gave your Social Security number so your credit score could benefit from the credit line. You can call the company to ask about your Social Security number. If your name does not come up, you probably are not responsible to pay on the account.
Are you an authorized user on the account? If you were only an authorized user on the account, you may have given your Social Security number, but that means you never agreed to be legally responsible to pay the account. Your ex also could have added you as an authorized user so you could use the card.
Was this a debt that could be eliminated in bankruptcy? Student loans, unpaid income taxes or a motor vehicle fine typically can't be wiped out in bankruptcy. If it's one of those kinds of loans, you might have to continue paying. If it was just an unsecured credit card, personal loan or medical bill, it most likely has been eliminated in her bankruptcy.
Now, I would not be a lawyer if I did not try to cover myself. I am basing this answer on your question and have not independently verified your claim. That being said, I have seen this scenario enough that I believe it a worthwhile question. Hopefully, you are no longer required to pay on this debt anymore.