https://www.irs.gov/pub/irs-drop/n-04-50.pdf
Q-37. An account beneficiary receives an HSA distribution as the result of a mistake of
fact due to reasonable cause (e.g., the account beneficiary reasonably, but mistakenly,
believed that an expense was a qualified medical expense and was reimbursed for that
expense from the HSA). The account beneficiary then repays the mistaken distribution
to the HSA. Is the mistaken distribution included in gross income under section
223(f)(2) and subject to the 10 percent additional tax under section 223(f)(4) or subject
to the excise tax on excess contributions under section 4973(a)(5)?
A-37. If there is clear and convincing evidence that amounts were distributed from an
HSA because of a mistake of fact due to reasonable cause, the account beneficiary
may repay the mistaken distribution no later than April 15 following the first year the
account beneficiary knew or should have known the distribution was a mistake. Under
these circumstances, the distribution is not included in gross income under section
223(f)(2), or subject to the 10 percent additional tax under section 223(f)(4), and the
repayment is not subject to the excise tax on excess contributions under section
4973(a)(5). But see Q&A 76 on the trustee’s or custodian’s obligation to accept a return
of mistaken distributions.