[%codes%] is correct. Did you remember to Enable Templated Email for that product?
Also, note that this will only work in the Email Message field of the specific product's settings; Item-Specific template variables will not work in any Common Thank-you Email Message.