def payload(self) -> Payload:
        kwargs_dict = {}

        if hasattr(self.kwargs, "upcast"):
            kwargs_dict = self.kwargs.upcast()  # type: ignore
        else:
            kwargs_dict = self.kwargs  # type: ignore

        try:
            # If it's not a reply message then load kwargs as a proper request payload.
            if not self.reply:
                return self.request_payload_type(**kwargs_dict)
            # If it's a reply message, then load kwargs as a proper reply payload.
            else:
                return self.reply_payload_type(**kwargs_dict)
        except PydanticValidationError:
            raise BadPayloadException