If you're about ready to refill your supply of medical marijuana, you might want to stop by an ATM first.

In the past few days, a number of Bay Area dispensaries have told their clients that from now on it's cash only, because Visa and MasterCard aren't allowing their cards to be used for marijuana purchases anymore.

"Visa and MasterCard are now refusing to accept your credit card charges for your medicine at many Bay Area dispensaries. We are working diligently to address this issue quickly," Vapor Room, a Haight Street dispensary, told members Sunday.

Harborside Health Centerin Oakland sent its patients a similar message, blaming a "continuing federal threat of seizure against financial institutions."

In fact, Harborside, the largest medical marijuana dispensary in the country, is facing a federal seizure threat of its own. On Wednesday, it was served notice from the U.S. attorney's office in San Francisco that its facilities in Oakland and San Jose are subject to forfeiture because they are being used to "distribute and cultivate marijuana."

Although marijuana for medical use is legal in 17 states plus the District of Columbia, it remains verboten as far as federal law, and the feds continue to take a dim view of commerce surrounding the practice.

"This has been going on for at least two years, with major financial institutions purging medical marijuana dispensaries from their transactions," said Kris Hermes, a spokesman for Americans for Safe Access, a national advocacy group based in Oakland.

For its part, San Francisco's Visa said Wednesday, "Visa has not changed its policy. Our policy is that Visa cards should only be used in connection with legal transactions. We do not allow the Visa payment system to be used for any illegal activity and have banned illegal transactions on Visa cards. Merchant banks, also known as acquirers, are responsible for ensuring that their merchant customers comply with all applicable laws."

Calls and e-mails to MasterCard were not returned.

Turned away at banks: Hermes said that the dispensaries are also having trouble finding a bank that will take their business. Bank of America, Citibank and JPMorgan Chase are reported to have closed off their teller windows to the businesses, as has San Francisco's Wells Fargo, which up until last year was offering accounts to local dispensaries.

"In view of the complex, inconsistent legal environment relating to medical marijuana dispensaries, Wells Fargo Regional Banking has opted not to bank these businesses," the bank said last year. "The policy extends to all medical marijuana dispensaries, and ... we have advised all such businesses that bank with us that they will need to close their deposit accounts. Additionally, it has been our policy not to provide merchant card processing services to businesses of this type."

That means Wells Fargo debit cards can't be used either, which comes as an additional blow to the dispensaries. Meanwhile, Square, the San Francisco mobile payments platform, is also cracking down on dispensaries that use its service. "Dispensaries are a violation of our terms of service. We have and will continue to shut down any users who do not follow the rules," Square said Wednesday.

Deaf ears: Responding to the concerns raised by the banks, 15 members of Congress, including Reps. Zoe Lofgren, D-San Jose, Pete Stark, D-Fremont, Sam Farr, D-Monterey - oh, and Ron Paul, R-Texas - asked U.S. Treasury Secretary Timothy Geithnerin May 2010 to assure financial institutions "whose account holders are involved in a business ostensibly operating in compliance with a state medical marijuana law," that they would not be targeted by the department. Two years on and Geithner has yet to respond.

Earlier, in October 2009, U.S. Attorney General Eric Holderissued a memo telling U.S. attorneys around the country they "should not focus federal resources in your states on individuals whose actions are in clear and unambiguous compliance with existing state laws providing for the medical use of marijuana."

The congressional appeals and Obama administration memos appear to have had little effect. Besides the threat of foreclosure, Harborside, for example, is embroiled in a $2.5 million dispute with the IRS over a claim the dispensary illegally deducted business expenses such as payroll taxes, rent, health insurance and workers' compensation, because it was involved in what the IRS labeled "the trafficking of controlled substances."

All this means that legalized medical marijuana businesses are having to conduct transactions in the same way as those who traffic in the substance illegally - in cold, hard cash. Some dispensaries already have ATMs in their offices, but that doesn't lessen the potential criminal hazards.

"Dispensaries are now having to deal with large amounts of cash," said Hermes. "That's not to say security at the facilities aren't adequate, but it does put them at greater risk of being robbed. These are issues everyone is struggling with."