After a loved one dies, who is responsible for his or her remaining credit card debt? This is a question you are unlikely to be thinking about in the days and weeks after the death, but it is one you will ultimately need to face.

In many cases, family members are not responsible for the debt, but there are a few exceptions. Luckily, while you and other family members sort out the financial impact of the death, you are protected by the Federal Fair Debt Collection Practices Act (FDCPA), which prevents debt collectors from using abusive or deceptive practices to collect a debt. According to the FDCPA, a debt collector might be a collection agency, a lawyer who regularly collects debts, or a company that buys debts and later attempts to collect payment.

When a spouse or other individual is a joint owner of a credit card account, that person is obligated to pay the debt after the death of the other co-owner. Most often, the co-owner is a spouse, but adult children will sometimes become authorized to use a parent’s credit card account, to help the aging parent with financial matters. They then become liable for unpaid credit debt after the death of the parent.

If the widowed spouse lives in a “community property” state, such as California and a handful of other states, he or she may be liable for the credit card debt, even if the account was not co-owned. In such states, debts incurred after the marriage may qualify as community property, which means that, regardless of the credit card agreement, the surviving spouse is responsible for the debt. Also, some states may require that particular kinds of debt, such as debts related to health care, be paid by the spouse. Particularly given the differing state laws, it’s a good idea to speak to an attorney to better understand your obligation.

When a relative or other person is not responsible for the uncollected debt, the responsibility falls to the deceased person’s estate. The executor of the estate (or an administrator appointed by the court if there is no executor) is responsible for using the estate assets to pay the debt. If the assets do not cover all or any of the debt, the debt is wiped out. This means that the deceased person’s heirs will not inherit the debt.