Dependent care timing for claiming

We paid child care/day camp related expenses for my daughter and I want to claim for 2023.  The problem is to get the camp locked in, my wife paid in 2022 for the camp that happened in 2023.  Is that fine to still claim expenses for 2023 since the activity happened then, or the payment must also land in the same year as the activity (in this case 2023)?