If I file the federal and state tax extensions and pay for both of the tax balance due by April 15, but later find that I don't actually owe that much when I file my federal and state tax returns, how can I request a refund of the amount I overpaid?

If I file the federal and state tax extensions and pay for both of the tax balance due by April 15, but later find that I don't actually owe that much when I file my federal and state tax returns, how can I request a refund of the amount I overpaid?