Genesis 38: 8-10
Then Judah said to Onan, “Sleep with your brother’s wife and fulfill your duty to her as a brother-in-law to raise up offspring for your brother.” But Onan knew that the child would not be his; so whenever he slept with his brother’s wife, he spilled his semen on the ground to keep from providing offspring for his brother. What he did was wicked in the LORD’s sight; so the LORD put him to death also.
So when Jacob came in from the fields that evening, Leah went out to meet him. “You must sleep with me,” she said. “I have hired you with my son’s mandrakes.” So he slept with her that night.