The scheme is being introduced by Tayside Police and Dundee City Council in the Stobswell area of the city.
PC Jim Smith said the codes would help identify where alcohol found on under-age drinkers was bought from and who had purchased it.
“When we find young people in possession of alcohol, every officer in the section now has the tools to readily find out where the alcohol was bought.
“We can then visit the off-licence in person and, if necessary, look at CCTV to see who bought the alcohol
“We continue to ask sales staff to be vigilant not only regarding young people buying alcohol for themselves but also proxy sales where adults are buying alcohol on the young person’s behalf.
“We do appreciate it is difficult for off-licences to ensure that every bottle of alcohol sold is not being passed on to youngsters.”