A security thread containing an invisible code printed in magnetic ink, which can be used to authenticate and/or denominate banknotes in sorting machines.