A method for verifying an authenticity of an identity document, said method being performed by a scanner comprising a slot for receiving the identity document, a casing, a first light source capable of generating white light, a second light source capable of generating Ultra Violet, UV, light arranged as two light sources, a third light source capable of generating Infra Red, IR, light, wherein the light sources (18, 20, 22) are arranged inside the casing, and a camera for acquiring images, said method comprising: detecting, by means of the camera, presence of the identity document in the slot of the scanner, wherein detecting the presence of the identity document in the slot of the scanner comprises illuminating the slot with white light, turning the camera into a filming mode and comparing the filmed images with a reference image, acquiring, by means of the camera, a first image of the identity document when it is illuminated with white light, acquiring, by means of the camera, a second image of the identity document when it is illuminated with UV light, acquiring, by means of the camera, a third image of the identity document when it is illuminated with IR light, encrypting each acquired image to generate encrypted images, sending a first message comprising a request for verifying the authenticity of the identity document together with the encrypted images to an analyze server, receiving, from the analyze server, a second message comprising a verification report generated at the analyze server, the second message including textual information extracted from the identity document, sending a first signal to an indicating means, said first signal indicating the state of the authenticity of the identity document as specified in the received verification report, and sending the textual information to a Point of Sale, POS, system in response to that the identity document has been verified. detecting, by means of the camera, presence of the identity document in the slot of the scanner, wherein detecting the presence of the identity document in the slot of the scanner comprises illuminating the slot with white light, turning the camera into a filming mode and comparing the filmed images with a reference image, acquiring, by means of the camera, a first image of the identity document when it is illuminated with white light, acquiring, by means of the camera, a second image of the identity document when it is illuminated with UV light, acquiring, by means of the camera, a third image of the identity document when it is illuminated with IR light, encrypting each acquired image to generate encrypted images, sending a first message comprising a request for verifying the authenticity of the identity document together with the encrypted images to an analyze server, receiving, from the analyze server, a second message comprising a verification report generated at the analyze server, the second message including textual information extracted from the identity document, sending a first signal to an indicating means, said first signal indicating the state of the authenticity of the identity document as specified in the received verification report, and sending the textual information to a Point of Sale, POS, system in response to that the identity document has been verified.