Top-of-the-line cannabis at BASA on Grove Street used to cost much less. But when the 15 percent state excise tax kicked in this year, Tariq Alazraie had to hike his prices and now an eighth-ounce of his premium product costs $62. If Proposition D, a San Francisco cannabis tax measure, passes in November, Alazraie said he’ll have to tinker with his prices again.

But in a new industry still competing with a robust black market, Alazraie says there’s a fine line to how much he can charge his customers: Too little and he’ll hurt his profit margin. Too much and his customers will go somewhere else.

“My profit margins are just getting thinner and thinner and thinner,” said Alazraie, president of the collective, pinching his fingers closer together.

Proposition D would levy a gross receipts tax on recreational cannabis businesses of between 1 and 5 percent — depending on if the business is retail or non-retail and how much gross revenue it takes in — starting Jan. 1, 2021. The first $500,000 of gross receipts from sales of recreational cannabis would be exempt from the tax, as well as retail sales of medical cannabis. If passed, the tax’s top rate would be the highest gross receipts tax levied on any industry within San Francisco, according to the San Francisco Chamber of Commerce.

Opponents of the measure, like Alazraie, say it’s too soon to impose another tax on the fledgling industry, while supporters, like Board of Supervisors President Malia Cohen, who wrote the measure, say the city needs the money to help the industry grow in a responsible and stable way.

“If cannabis is going to be a legal business, they must be treated like it,” Cohen said.

San Francisco will become the last major city in California to impose a local cannabis tax if Proposition D passes in November. The tax will be lower than gross receipts taxes in surrounding cities, such as Oakland, which has a 10 percent gross receipts tax on recreational cannabis.

Tucked into the measure is a provision that would allow the city to tax out-of-town companies with online transactions in San Francisco that exceed $500,000 starting Jan. 1. The tax on online sales would not be limited to cannabis businesses.

It would level “the playing field for brick-and-mortar stores in San Francisco,” said Supervisor Aaron Peskin, a co-author of the measure. The tax on online businesses would generate an estimated $2 million to $4 million in 2019, according to City Controller Ben Rosenfield.

Separately, the cannabis tax would generate an estimated $5 million to $12 million beginning in 2021. The money would go into the city’s general fund.

The Board of Supervisors would have the power to increase or decrease the cannabis tax after it goes into effect.

The local tax proposal comes nearly two years after voters passed state Proposition 64 to legalize recreational cannabis for people 21 and older. There was a lot of anticipation that the state’s black market and loose medical marijuana market would be converted into a thriving, multibillion dollar industry, the largest in the nation.

But because many buyers and sellers stayed in the black market, the industry has so far generated less tax revenue than the state anticipated. Gov. Jerry Brown’s January budget proposal predicted the state excise tax would generate $175 million during the first six months of 2018. By June 30, the cannabis sales only generated $135.1 million, according to the California Department of Tax and Fee Administration.

Cohen said she agrees the state excise tax is a burden and that she is working at the state level to lower it. But in the meantime, if the cannabis industry wants to be legal it has to pay the price, she said.

During a recent afternoon rush at BASA, Michelle Golder, 30, said she was fine with the idea of paying a local tax for cannabis. In fact, she had already voted in favor of Prop. D.

“Anything that is recreational should be taxed,” she said, after paying $31 for recreational cannabis at the dispensary. “It’s (cannabis) something I indulge in, so I don’t mind.”

But others, like a 26-year-old named Ben, who declined to provide his last name, said another tax would likely just push him toward the black market, where the prices would be significantly less. Prop. D, he said, is probably something he would vote against.

“As of right now it’s getting pretty pricey,” he said, holding a brown bag containing his purchase.

While Prop. D wouldn’t put a gross receipts tax on medical cannabis sales, David Goldman, president of the Brownie Mary Democratic Club, a cannabis activist group, said medical retail sales will still be impacted because the tax will apply to businesses lower on the supply chain, such as manufacturers and distributors.

Cohen said the money would go toward educational programs on the effects of cannabis, training for the growing cannabis workforce and compassion programs, which donate medical cannabis to low-income patients. She said putting the money into a general fund will give the city flexibility on how to spend it if needs change by 2021.

“It’s a reasonable measure that finally puts San Francisco in line with other cities across the state,” Eric Lukoff and Gina Simi co-chairs of the Alice B. Toklas LGBT Democratic Club, said in a statement. “We’re really talking about asking the biggest companies to contribute a small amount.”

Those skeptical of the measure don’t buy that the money will be spent to the industry’s benefit.

If the money was guaranteed to go to something like homelessness, Emerson Stafford, a BASA customer who has been smoking cannabis for 50 years, said he would vote for Prop. D “in a minute.” He said he would likely vote for Prop. D — but he wasn’t thrilled that his money would into a general fund.

“They are entitled to a local tax, but I don’t like the fact that it’s not being spent for something more specific,” he said.

Benjamin Manton, a manager at BASA, said he has watched from behind the register as the state tax has pushed up prices over the past year.

“It’s important for people to play by the rules, but there’s an overestimation of how much blood there is to give,” he said, as he unpacked boxes at the dispensary on a recent afternoon.

Trisha Thadani is a San Francisco Chronicle staff writer. Email: tthadani@sfchronicle.com Twitter: @TrishaTha