Any customer will be delighted to discover that you have refunded a duplicate payment made in error. Particularly if you found the mistake before they did!
Here is a sample letter you can send telling them the refund is being processed.
Letter confirming refund of a duplicate payment – sample 1
Dear [customer’s name]
[We / Our finance team] received a [cheque / bank transfer etc] from you on [date] for payment [on account no /for invoice no], however we noticed that you had in fact already made a payment for that [account / invoice] which we received on [date].
We have therefore issued a refund for this duplicate payment which you should receive within the next few days.