When Susan Rosalsky was hired as an English instructor at SUNY Orange last year, she was elated. After several years of unemployment, she and her husband, Michael Trost, had been eating through their savings and 401Ks. Better yet, the job came with good health insurance through New York’s Empire Plan and United Healthcare. Rosalsky signed herself, Trost, and their daughter up for the plan.

“I thought we were out of [hot] water,” she said.

And they were—until this past March. One morning the couple was out walking their dog when Trost began feeling short of breath. “Just take me to the ER,” Rosalsky recalls him saying.

Trost and Rosalsky live in Dingmans Ferry, on the easternmost edge of Pennsylvania. There was an emergency room in the nearby town of Milford, but Rosalsky didn’t think they were in-network there. Another option was a nearby urgent-care center, but it was across the border in New Jersey, where Rosalsky wasn’t sure she was covered. She opted for Bon Secours Community Hospital in Port Jervis, New York—the state where the couple’s insurance plan was based. When they arrived, the couple says they were told their insurance would indeed be accepted.

Bon Secours admitted Trost, and, after performing an echocardiogram, deduced that he had a failed mitral valve and would require surgery. He was taken by ambulance to a different hospital, Good Samaritan in Suffern, New York. Rosalsky says Trost asked there, too, whether his insurance would be accepted and was told it would.

On April 1, Trost’s heart was operated on by Arthur Ng, a cardiac surgeon with an independent surgery group based in Hackensack, New Jersey. Trost was in the hospital for a week before going home to recover.

Within weeks, the couple began receiving the types of bills you’d expect from this type of experience: A few hundred for a hospitalist, a few hundred more for a urologist. Insurance pitched in, and Rosalsky wrote checks for the rest.

But the biggest bill was eye-popping: $32,845 for Ng’s services. United Healthcare offered to pay just $4,000 of that total.

Rosalsky provided a copy of the bill to The Atlantic, but Ng’s office did not return requests for comment.

The couple had encountered what’s known as a “balance bill”: The term for a situation in which an entire hospital stay or procedure is covered by insurance, but one of the specialists involved is out-of-network and bills the patient separately.

“Mike's life was in jeopardy,” Rosalsky said. “There was little time to think rationally. It would never have occurred to us to ask every individual, ‘Are you in my network?’"

Not all surprise medical bills are balance bills. However, nearly one-third of privately insured people have received a surprise medical bill in which their insurer paid less than they expected, according to a nationwide survey of more than 2,000 people conducted by the Consumer Reports National Research Center earlier this year. Balance bills for hospital visits sometimes occur when the doctor sends the patient a second, separate bill, on top of the one from the hospital.

Surprise bills might be likelier to occur in situations like Trost’s, where the patient lives in one state, is covered by a plan in a different state, and is treated by a provider based in a third state. About 5.2 million people commute to a different state for work, according to the Census Bureau.

“In the New York City metro area for example, there are hundreds of thousands of people who commute across the ‘tri-state’ area of New York, New Jersey and Connecticut,” said Chuck Bell, program director for Consumers Union, the policy and advocacy arm of Consumer Reports. “Ultimately, the varying state laws and regulations can be extremely confusing for consumers.”

Balance billing may become more common for all Americans as insurers narrow their networks, according to Sandy Ahn, a research fellow at Georgetown University's Health Policy Institute.

Rosalsky appealed Ng’s bill with her insurance, but the plan denied her appeal in a letter, which she also provided to The Atlantic. Rosalsky began “freaking out” and “panicking,” she said. She searched online for information and discovered that New York had recently passed a law that prohibits balance billing.

“I thought, ‘Holy shit, does this apply to us?’"

But then she took a closer look at her insurance-denial letter. “Please be advised that the New York State Surprise Bill Act is for New York State residents,” it read.

She was, once again, crestfallen. Dingman’s Ferry is just a 30-minute drive from New York. But it is not, alas, in New York. She was worried they were going to tear through their savings again just as they were getting back on their feet. “The money I had just put aside for a new car, that's going to go to the doctor,” she thought. “The money for household repairs, that's going to the doctor.” She called her bank to ask about getting another mortgage on the house.

She also called the office of Pennsylvania Senator Bob Casey. Casey’s office routed her to the New York Department of Financial Services.

They told her she was protected by the New York law. Where she lives, they said, is inconsequential.

In an email statement, a spokesperson for the Department of Financial Services said the New York law applies to state residents, doctors who practice in New York, and health plans based in New York. The agency said that out-of-network providers who bill patients for the balance of their services must provide a special claim form so the patient can contest the bill. (Rosalsky said Ng’s bill didn’t come with such a form, possibly because he’s based in New Jersey). Insurers’ explanations of benefits must also include information about the New York state law. It’s possible that the date the law went into effect had something to do with Trost’s denial—it was March 31, the day before his surgery.

“After reviewing Mr. Trost’s [sic] information ... he does meet the requirement for protection under the new law. We will address the surprise bill with the physician as outlined under the law,” United Healthcare’s public-relations director, Maria Gordon Shydlo, told me via email.

Just a few weeks ago, the couple received another letter from the insurance company, this time saying they owe nothing.

Rosalsky is relieved, but the ordeal has been nonetheless puzzling: Ng’s office accepted much less from United Healthcare than Ng had originally billed Trost. It’s like when “you go into a store, and you see markdowns at the end of the season—and they're still making money on that,” Rosalsky said. “What's the real value? Nobody knows.”

New York’s law requires providers to tell patients whether they participate with their insurance—but not necessarily when they’re called in to treat a patient in a hospital. Another question is why the denial letter implied that the couple wasn’t protected by the law because they didn’t live in New York. Bell, with the Consumer’s Union, said that in the 13 states that prohibit this type of balance billing, the restrictions are usually based on the state in which the insurance plan is located.

Still, it’s murky: “In some states, the laws or regulations may apply to health facilities and/or providers rather than insurance companies,” he said. “But generally speaking, protections against surprise medical bills are inadequate in most states. Consumers receive surprise out-of-network bills for a myriad of reasons—inadequate networks, lack of disclosure and information about provider status, excessive charges by providers and facilities, and unclear reimbursement practices for out-of-network care. But unfortunately, many of these practices are currently permitted in many states.”

So what should people—other than New Yorkers—do if they’re confronted with a surprise medical bill?

Experts say you shouldn’t pay it right away, but you shouldn’t wait to act either. If a provider takes the bill to collections, it could ding your credit.

First, Ahn says, call your insurance company and ask them if they can pay the rest of the bill. If they refuse, call your state’s Department of Insurance. (Consumer’s Union has a tool for finding the correct contact information in each state.)

In the worst cases, you might have to contact a lawyer, Ahn says. Patients who can’t afford lawyers may need to be their own advocates. If either the insurance company or the provider won’t back down, Bell said, you might start sending certified letters in order to get their attention, “especially if the clock is ticking and the bill may be referred to collections.”

As Rosalsky learned, it can be a hassle. But it beats paying a cardiologist $30,000 that you don’t have.