Made unnecessary payment to IRS. How do I get my money back?

An hour after I dropped my federal payment in the mail, I was notified by turbotax my return was rejected by the IRS.  The corrections I made to the return resulted in a refund.  How do I get my money back from the IRS?  thank you