Paid 2018 payment by mistake

I owed for 2017 taxes. I made a payment in November 2018 that hasn't been applied. IRS says the payment was applied to estimated 2018 taxes. Now, we are supposed to get a refund for 2018 taxes which I havent filed yet due to this issue. What will happen with that payment and the refund?