You have two options:
1- upon payment of your online course
2- at the end of the course, just before printing your certificate.