He said to the (sailors), We will embark with you. They replied to him, Behold, we are going to the islands of the sea, to Tarshish. He said to them, We will go with you. Now (this) is the custom on all ships that when a man disembarks therefrom he pays his fare; but Jonah, in the joy of his heart, paid his fare in advance, as it is said, "But Jonah rose up to flee unto Tarshish from the presence of the Lord; and he went down to Joppa and found a ship going to Tarshish; so he paid the fare thereof, and went down into it, to go with them" (Jonah 1:3).
Jonah and the Great Fish of Tarshish
Pirkei DeRabbi Eliezer 10:2