dmertz
Level 15

Deductions & credits

I don't understand how an HSA custodian can prepare a code 2 Form 1099-SA without themselves validating the amount that they report in box 2.

A return of contribution paid to you has no effect on the Form 5498.  The Form 5498 would only be affected if the excess was paid back to your employer, in which case the HSA custodian should not include the returned amount on the Form 5498, treating it as if it the money had never been deposited into the account.

Yes, as Opus 17 indicated, the excess can be resolved by obtaining a return of excess contribution from your wife's HSA instead.  It's up to you and your spouse to decide which account contains the excess.