Play video content EXCLUSIVE

XXXTentacion is suing the woman he appears to have smacked in the head in a video, claiming she's lying about what really happened, and hitting him up for a stack of cash.

XXX says his manager reached out to the woman right after she posted the video last month. As TMZ first reported ... he says her grandparents called back and asked what the rapper would be willing to do to "make everything good."

According to the suit, the grandparents alleged XXX had also thrown a BB gun at the woman's face prior to the hit seen on video. He claims they asked for $300k in exchange for the woman's silence. In docs, the 20-year-old hip-hop star says she was threatening to hold a news conference to blast him as a frequent abuser of women.

In the suit, X says the woman was lying when she posted a message saying she didn't reveal the video earlier because she was "terrified for her life." In fact, in the suit he says he was just joking in the video while dancing behind her, and merely "tapped the back of her head."

His side of the story is she had admitted to him the whole thing was just horseplay, and she was NOT injured. He claims she and her family were taking advantage of his tight situation -- he's already awaiting trial for an alleged 2016 beating of an ex-girlfriend, who was pregnant at the time.