Oh, the joys of having a joint credit card account with your spouse – the high spending limits, the low interest rates, and the ample rewards. (Sometimes I still pine wistfully for the perk-laden joint AmEx I used to share with my ex.)

But all the “pros” of having joint credit cards will quickly give way to “cons” when the sweetness of married life sours. In a divorce, you’re going to have to decide who will pay the debt. And until it’s wiped out, you’ll both be legally on the hook.

American households now carry an average of $8,942 in credit card debt, according to personal finance website WalletHub. Meanwhile, U.S. marriages have about a 45 percent chance of ending in divorce, according to federal statistics. That means credit card debt likely comes into play in a lot of divorces. 

Credit card debt can be easy to handle in a divorce. Or it can become a nightmare that haunts your financial life for years. It all depends on how amicable the divorce is, how clear-cut the settlement or judgment terms are, and maybe how irresponsible or vengeful your soon-to-be-ex spouse is.

“If it’s a joint debt, such as joint credit card debt, then the failure to service that debt will impact everyone equally,” New York divorce lawyer Michael Stutman, founding partner of Stutman Stutman & Lichtenstein LLP, said. “One person may have less of a concern than the other” about the impact of not paying “and say, ‘to hell with it, I don’t care what happens to my credit rating.’” 

So how do people getting divorced divide credit card debt equally while also protecting their own financial health? Details can vary by state, but the starting point and guiding principles are generally the same, according to divorce lawyers.

Step 1: Look at the total financial picture

Whenever you start thinking about divorce, one of the first things you should do is gather a complete picture of your marital finances, including income, expenses, assets and liabilities, divorce attorneys advise. That means you should look at what both spouses earn, what they spend, what you both own, such as cash, retirement accounts, automobiles and real estate or other property, and what you owe, such as mortgages, auto loans, student loans or credit card debt.The process will be less painful if you’ve been keeping reasonable track of these things throughout the marriage. It’s also a good idea “to regularly run credit reports to ensure that there are not any credit cards or loans being taken out in your name that you are unaware of,” Scott Ellerin, a Jacksonville, Florida-based divorce attorney, said.

Step 2: Understand what counts as marital debt

This may depend on what state you’re in. In “common law” states, spouses will only be jointly responsible for debt that’s in both of their names, such as a mortgage or joint credit card debt. The situation can be dicier in “community property” states. In community property states, most assets or liabilities you or your spouse rack up during the marriage will be divided equally, no matter whose name they are in. In those states, it’s not just joint credit card debt you have to worry about – you may need to think about credit cards your spouse took out in his or her own name, too. Most states are common law states. Community property states include Arizona, California, Idaho, Louisiana, Nevada, New Mexico, Texas, Washington and Wisconsin. Spouses can also opt into a community property system in Alaska, Florida, Kentucky, Tennessee and South Dakota.

Step 3: Pair debts with assets

To make sure both spouses get treated equitably, a good approach is to distribute assets and debts in “pairs” of roughly equal amounts, said Stutman. For example, perhaps there is a $10,000 credit card debt and a $20,000 before-tax IRA account, which might be considered worth about 50 cents on the dollar for negotiation purposes. “It would make sense whoever gets the IRA gets the credit card debt,” Stutman said. “Fair is far.”

Step 4: Analyze the transactions

Another way to distribute credit card debt is to take a hard look at what the debt is for. It might make sense to split the repayment responsibility evenly if the debt is from household expenses that benefited both spouses. But if one party splurged mostly on themselves or used the credit card to pay for things related to an extramarital affair, then they might be “stuck with that debt” on their own, Stutman said. If a divorce ends up in court, and credit card debt is a point of contention, a judge may go through the same type of analysis, he said.

While fair treatment is certainly important in divorce, you may want to think twice about dividing joint debt, such as credit card debt, if you are concerned that your spouse won’t be able to pay his or her share.

Step 5: Consider who is able to pay

While fair treatment is certainly important in divorce, you may want to think twice about dividing joint debt, such as credit card debt, if you are concerned that your spouse won’t be able to pay his or her share. “Tit-for-tat” might reasonably take a back seat to keeping your credit pristine. Remember when an ex-spouse doesn’t make payments on joint debt, that hurts your credit, too. And the credit card company can also try to collect from you or sue you.

“We try to get a good look at what the debt situation is, and who gets the most severely impacted by the failure to pay it,” Stutman said. To minimize the risk, you should close any joint credit card accounts when you start the divorce process and clarify who is making minimum payments, he added. “We tell people to terminate lines of credit and terminate credit cards to reduce your exposure to chicanery by the other side.”