The woman who claimed she became suicidal after Jim Carrey gave her herpes created an elaborate extortion scheme with fake medical records to make it seem she was clean before she met Jim ... this according to new legal docs.
Carrey now claims Cathriona White -- who committed suicide in 2015 -- had herpes before they met, but needed to change the facts. So he says she got her friend's medical records showing a clean bill of health, and then altered them to make it appear the records were hers.
According to Carrey's new legal docs, White then presented the before and after medical records, claiming it was proof -- the only change was that she started having sex with him and got genital herpes.
Carrey claims in legal docs they have a smoking gun in the form of text messages from White to her friend ... asking the friend numerous times to go to Planned Parenthood to get her medical records and one of the text messages says, "I need to see the layout ... I will need to work on it before I give it to him."
The new docs were filed in connection with a lawsuit brought by White's husband and mother, who claim Carrey gave her the disease and that's why she killed herself.
Carrey's legal team just made an ultimatum ... either ante up non-forged medical records or admit she had multiple STDs before she even met the actor.
Michael Avenatti, attorney for Cathriona's estate, tells us Carrey's new claim is "complete and utter bulls**t. When the truth comes out, Mr. Carrey and certain of his advisers are going to be criminally prosecuted for their conduct in this case. They better buckle up."