Charging a client's credit card on 12/31/21, doesn't hit my bank until 1/3/22: In which year to count it as income?

I own a psychotherapy business, and I use Square to handle my clients' credit card payments. I charged a client's card on 12/31/21 for a rather large amount, and it didn't get deposited into my bank account until 1/3/22. If I run a report in Square, it counts the income in 2021. But if I run a report in my money management software for my business bank account, it counts the income in 2022.

 

Which is it? Which year should it go in? When the client was charged? Or when the money appeared in my bank account?

 

Thanks in advance for the help!

 

-Mark