Cannabis will become legal in Canada next month and the government is wrestling with the complex issue of preventing minors from purchasing it online.

Consumers visiting dispensaries will have to show ID to prove they’re over the legal age – 18 in Quebec and Alberta, 19 across the rest of the nation – but that is harder to enforce online. A recent Deloitte report suggested that more than a third of cannabis users in Canada will switch to online purchasing. That presents the government and the retailers with a bit of a headache as they try to prevent minors from purchasing it.

The campaign group Drug Free Kids Canada is deeply concerned about this matter and it’s putting pressure on lawmakers to protect children.

There’s no major precedent in the world since Canada is just the second country after Uruguay to legalize marijuana.

However, a number of age-restricted products are available to buy online, most notably alcohol, and these retailers have a raft of measures in place to age gate consumers.

Age verification online is a key way to prevent Canadian children buying marijuana, but the most important measure will be delivery drivers demanding to see ID before handing over the goods.

This is something the likes of Amazon and the liquor boards do with beer, wine, and spirits, and they simply need to be as vigilant when it comes to weed. The government has also created a law whereby it’s a criminal offense to sell cannabis to underage Canadians. That should prove to be a strong deterrent.

Cannabis use is high among Canadian youths, but the government acknowledges it’s grappling with a delicate issue.

“The Government of Canada has accepted the advice of the Task Force, that, in determining the minimum age for consumption of legal cannabis, the Government of Canada should strike a balance between the known health risks of cannabis and the reality that Canadian youth and young adults use cannabis at rates that are among the highest in the world,” it said. “Setting a limit that is too high would continue to encourage young adults to seek out cannabis on the illegal market.”

The whole point of legalizing cannabis is to wipe out the black market, make it safer, and earn tax revenue from it, so it cannot afford to be uncompetitive with illicit retailers.

Deloitte anticipates that 63% of Canadian cannabis users will switch to legal distributors, and that could put several dealers out of business, meaning fewer opportunities for children to buy weed on the black market. Then it will be down to the government to educate retailers about the pitfalls of selling to minors, and make an example of anyone that breaks the law dishing out strict punishments.