After joining a Medicare Part D prescription drug plan recently, I was happy to see that one of its member pharmacies was a small, family-owned business. I have a fondness for neighborhood drugstores, as my late pharmacist father owned one when I was growing up. We lived in an apartment above the store, and I remember my father getting up in the middle of the night to go downstairs and fill emergency prescriptions.

After several years of using a mail-order service and chain stores, I loved the idea of returning to my roots.

I was not so happy, however, when this store tried to gouge me on my first prescription, a generic thyroid medication that should have cost me only $3 for a 90-day supply. The store handed me a bill for $58.

When I protested, the woman behind the counter said the pharmacy couldn’t afford to accept such a low co-pay and claimed that the store wouldn’t receive anything in reimbursement from my insurer. “We are a small business,” she said. “That’s a big loss for us, so we have to charge you our cost for the drug.”

Well, no.

In addition to not telling me upfront and giving me the option to go elsewhere, this store was in violation of its contract with my insurance plan.

When drugstores join a Part D plan, they agree to charge consumers the plan’s designated co-pay for each drug and to accept the plan’s reimbursement amount. In return, they get customers seeking low-cost drugs, customers who will buy additional items once inside the store.

Apparently, though, some smaller stores can’t afford to take these low co-pays and reimbursements, and they try to recoup their costs by charging more or try to avoid losing money by refusing to fill the prescription.

“You were a victim of classic bait-and-switch,” said Mark Merritt, president and chief executive officer of the Pharmaceutical Care Management Association. His group represents pharmacy benefit managers, or PBMs, which administer prescription drug programs for many of the nation’s health plans, including Medicare Part D. “The pharmacy signs on to a plan, then gets consumers in the store and tries to charge them a higher rate. They overcharge, then still pocket the co-pay.”

When consumers look for a Part D prescription drug plan to join, they sign onto the Medicare website and put in the names and dosages of the drugs they take. The website responds with a list of plans from which to choose, each with premium costs and co-pays. This enables consumers to comparison-shop.

Once in a plan, consumers should get the lowest price if they fill their prescriptions at a member, or “preferred,” drugstore.

I refused to pay and took my prescription to a nearby chain store. Because this store was not a member of my plan, the co-pay — $28 — was still more than I had expected to spend, but I decided to pay and look later for a new pharmacy that was in my Part D plan and would charge me the lowest co-pay.

I would have just moved on, but my plan — part of the Aetna group — sent me a pamphlet shortly thereafter, suggesting I save money by using one of its preferred pharmacies. Believe it or not, the store that had tried to overcharge me was among those they recommended.

I called the plan to complain. An investigator followed up the next day with a phone call and additional questions. I don’t know the outcome.

While there are more than 3,000 drug plans under Part D and Medicare Advantage, the agency generally regards problems such as these as contract disputes between the stores and the insurers, according to the Centers for Medicare and Medicaid Services.

CMS, however, does monitor complaints, which typically involve a pharmacy’s refusal to fill a prescription because of low reimbursement. It is unclear how widespread these practices are. However, since Jan. 1, less than 1 percent of pharmacies in Aetna’s Part D network (more than 60,000 pharmacies) have allegedly refused to fill prescriptions, and Aetna has resolved most of these, according to CMS.

“The small drugstores are taking a hit and are in a financial squeeze,” said John Norton, a spokesman for the National Community Pharmacists Association, which represents independent drugstores. “There have been tremendous spikes in the prices of generic drugs, a few as much as 1,000 percent overnight, while the pharmacy benefit managers are dragging their feet in reimbursement, leaving small drugstores losing $40 to $100 or more for each prescription. At the same time, if [the drugstores] drop the contract, they don’t get access to patients. These contracts are take-it-or-leave-it.”

Many generics are subject to what is known as a maximum allowable cost, or MAC, a reimbursement amount set by insurers, government assistance programs, PBMs and others.

Merritt, of the group representing pharmacy benefit managers, acknowledged that prices change often, but he insisted “we try to keep pace.” Hearing my story, he called it “implausible” that the pharmacy would not have received some reimbursement. “They always get something,” he said.

Medicare beneficiaries need to be alert. It is important to know the co-pays for each of your drugs. You can learn this from the Medicare website (medicare.gov) when you are first shopping for a plan, or by calling your plan directly once you are enrolled. If a member drugstore tries to overcharge you or refuses to fill your prescription, let your plan know. Ask them to investigate. If a drugstore violates its contract, the insurer may drop it from its network.

I still don’t have a drugstore for myself, but I will in time for my next refill.

Meanwhile, I think about my father and his relationship to our old neighborhood. If he had heard this story, he would have been appalled.