The story
* In the die sense, apparently attested since the 1820s, thus earlier than the variant buy the farm, which may be an extension of it. * In the have it sense, an elliptical allusion to believing a sales pitch.
Etymology from Wiktionary, CC BY-SA 4.0.