This paper investigates the influence of gifts – monetary and in-kind payments – from drug firms to US physicians on prescription behavior and drug costs. Using causal models and machine learning, we estimate physicians’ heterogeneous responses to payments on antidiabetic prescriptions. We find that payments lead to increased prescription of brand drugs, resulting in a cost rise of $23 per dollar value of transfer received. Paid physicians show higher responses when they treat higher proportions of patients receiving a government-funded low-income subsidy that lowers out-of-pocket drug costs. We estimate that introducing a national gift ban would reduce diabetes drug costs by 2%.