In addition to Pierre LisonPierre Lison's answer in favor of a reward function as $ R: S \times A \rightarrow \mathbb{R} $, Sutton and Barto touch on the topic in chapter 3.6 of their book "Reinforcement Learning: An Introduction".
Although the accepted answer is correct in terms of what is most commonly used, they prefer $ \mathcal{R}: S \times A \times S \rightarrow \mathbb{R} $. From said chapter:
In conventional MDP theory, $\mathcal{R}_{ss'}^a $ always appears in an expected value sum [...], and therefore it is easier to use $R_s^a$. In reinforcement learning, however, we more often have to refer to individual actual or sample outcomes. In teaching reinforcement learning, we have found the notation $\mathcal{R}_{ss'}^a $ to be more straightforward conceptually and easier to understand.