If you opt for APCP, do you have to pay it on the 8th week, or it can be paid on the 9th week?

It can be paid on the ninth week.  That is you need to pay it on the next pay day even if it falls after the normal 8 week covered period.  See PPP Loan Application for Forgiveness that covers this.

Alternative Payroll Covered Period: For administrative convenience, Borrowers with a biweekly (or more frequent) payroll schedule may elect to calculate eligible payroll costs using the eight-week (56-day) period that begins on the first day of their first pay period following their PPP Loan Disbursement Date (the “Alternative Payroll Covered Period”). For example, if the Borrower received its PPP loan proceeds on Monday, April 20, and the first day of its first pay period following its PPP loan disbursement is Sunday, April 26, the first day of the Alternative Payroll Covered Period is April 26 and the last day of the Alternative Payroll Covered Period is Saturday, June 20. Borrowers who elect to use the Alternative Payroll Covered Period must apply the Alternative Payroll Covered Period wherever there is a reference in this application to “the Covered Period or the Alternative Payroll Covered Period.” However, Borrowers must apply the Covered Period (not the Alternative Payroll Covered Period) wherever there is a reference in this application to “the Covered Period” only.