The invention relates to an apparatus for treating a medical liquid, which apparatus comprises a treatment machine with a coupling surface and with a flexible mat arranged on the coupling surface, wherein a cassette made of a hard part with liquid-conveying channels, which are covered by a flexible film, can be coupled via the flexible mat to the coupling surface of the treatment machine. According to the invention, in order to permit the monitoring of correct coupling of the cassette to the coupling surface, the apparatus is designed in such a way that a pressure difference of the pressure between the cassette and the flexible mat and of the pressure between the mat and the coupling surface can be determined. The invention further relates to a method for checking the leaktightness of the aforementioned apparatus.