Write it as it is.
When you write dialogue, you don't write it up as formal English (or another language). You write what the characters say. If someone squeals or rolls their eyes or starts choking, you'd narrate that as well.
Written communication is similar to speech in that what's said is said and that's how you report it (after having created it of course). Emoticons are part of the communication. They aren't descriptions.
The difference is that written communication is often set apart in a book. A shaded box or indented italics are both common. This is in lieu of using the usual tags one uses in spoken dialogue.
For a back and forth chat, it's common to add the names. I'm making up the name of your female character for this example.
Julia: Kyle, you're so funny! XD I can't believe you did that!
Kyle: Yeah, I am the funniest clown on earth! ;). Oh, crap, time to
If you'd like to intersperse action (which I'd recommend if it gets longer than this example), go back to the regular text to do it, then start a new box (or whatever you're using).
If it's text messaging, you can also create a box that looks like a phone screen. Something like this.
For short exchanges, you can add them in like spoken dialogue, only noting that it's from the chat or it's a text message.
Just before turning out the light, she glanced at her phone and found
a message from Kyle. A photo of a black and white cat with a clown
nose and a note saying "if you can loan me your math notes tomorrow,
that would be purrfect."
Julia giggled. What a doofus. Then she turned out the light.