2 Samuel 24:22-23
22-23"Oh," said Araunah, "let my master the king take and sacrifice whatever he wants. Look, here's an ox for the burnt offering and threshing paddles and ox-yokes for fuel—Araunah gives it all to the king! And may God, your God, act in your favor."
24-25But the king said to Araunah, "No. I've got to buy it from you for a good price; I'm not going to offer God, my God, sacrifices that are no sacrifice."
So David bought the threshing floor and the ox, paying out fifty shekels of silver. He built an altar to God there and sacrificed burnt offerings and peace offerings. God was moved by the prayers and that was the end of the disaster.