https://www.irs.gov/credits-deductions/individuals/qualified-ed-expenses
" Qualified Education Expenses for Education Credits
Qualified expenses are amounts paid for tuition, fees and other related expense for an eligible student that are required for enrollment or attendance at an eligible educational institution. You must pay the expenses for an academic period* that starts during the tax year or the first three months of the next tax year.
Eligible expenses also include student activity fees you are required to pay to enroll or attend the school. For example, an activity fee that all students are required to pay to fund all on-campus student organizations and activities.
For AOTC only, expenses for books, supplies and equipment the student needs for a course of study are included in qualified education expenses even if it is not paid to the school. For example, the cost of a required course book bought from an off-campus bookstore is a qualified education expense. "