Does the word "pay" have the same definition in the next two sentences?

She had to pay the penalty for speaking out rashly.

He paid her off the books and in kind where possible.
different meanings