Investors & landlords

I paid capital gains in 2022 to Canada.

95k.   I then filed 1116 in USA. And got the credit.   Then in 2023 Canada sent me 30k as a refund from the capital gains tax paid. I guess I didn't understand  that I should amend 2022 because that refund came in 2023