Was it ok for my boyfriend to slap me during sex?

My boyfriend usually dominates me while we have sex but yesterday while we were doing it I was on my back and had my eyes closed, so he slapped me and grabbed my throat then told me to look him in his eyes. After that he was more rough and aggressive, I can tell it really turned him on. I let him finish but I was completely stunned after that. It was like a whole other side of him and I don’t know how to react to it.
Was it ok for my boyfriend to slap me during sex?
Post Opinion