Is it free to use IMessage with your data internationally? Or is that only using Wi-Fi?

I have a friend who is from Canada and I'm from the US. And he has an iPhone and so do i. He said that we can text on our phones for free internationally using iMessage, but what I've heard is that it's only free if you're using Wi-Fi. What about your data? Is it still free when I go out and am away from Wi-Fi and use my data? My messages still appear blue when I message him with my data but I'm concerned that it's not completely free when doing so.

The part that costs money is cellular data usage. On cellular each message will use some of your data allowance. With Wi-Fi the data skips the cell towers and hits the internet for free through the generosity of the shop you're visiting.