Was I in the wrong?

I told this guy I didn’t want to have sex with him....for months. Actually off and on for a full year since we’ve met up again.

Then one day he texted me and said, how are you? I said not good, he asked why? I said my phone is probably about to get cut off because I’m 312 dollars behind on paying it. He said I’ll pay half if you be my fwb. I said no Bc I’m not a prostitute. Then he said, “even if I pay it in full?” I still said nope.

(Btw I know this guy because we went to high school together and were good friends and kinda still are, we reconnected last year when we saw each other again and found out we don’t live too far from each other) I always knew he had a crush on me though.

Then one day he asked me to hang out (like we usually do but as friends) I came over, we smoked, and then he pulled out $320 and gave it to me. I took the money bc he gave it to me, but again, I told him we couldn’t do anything. He said okay. but he still thinks I owe him something. Like he now texts me saying I owe him sex.

My question is, was I wrong for taking the money? I thought he still let me have it because we’re friends.