Exodus 21:30

21:30 If a ransom is set for him, then he must pay the redemption for his life according to whatever amount was set for him.

Exodus 30:12

30:12 “When you take a census of the Israelites according to their number, then each man is to pay a ransom for his life to the Lord when you number them, so that there will be no plague among them when you number them.