I need advice

I have no idea what to do and I am so stressed. My son has been biting me very hard white breastfeeding and of course I yelp and pull my nipple out and he laughs, he thinks it’s hilarious and is now doing is on purpose randomly in the middle of a feed and I know he doesn’t understand that it’s hurting me but I have no idea what to do I tell him that hurts mommy and stop the feed and it isn’t working and he will not go to sleep without feeding so this is making it extra hard for naps and bedtime. It hurts so bad and I am not ready to stop breastfeeding but if he continues to do it I’m not gonna have a choice. Please if anyone has any advice 😩