 When something goes wrong, we say, they'll be the devil to pay. The devil in this expression is not Satan, and to pay has nothing to do with the usual definition of the term. The devil is a seam on a wooden ship that is usually below the waterline and hard to reach. To pay means to caulk the seam with a water-resistant preparation like hot pitch.