It is not possible to pay and upgrade after a course ends, but you are welcome to begin a course in the audit track, then upgrade to the verified track soon after the course begins. Generally, you have two weeks after the course begins to upgrade to a verified certificate. Some courses allow you to upgrade later in the course.
To find the specific deadline for your course, go to the course Home page, and then locate Verification Upgrade Deadline under Important Course Dates.
To upgrade, click the green "Upgrade to Verified" Button under the course on your edX dashboard or the Upgrade to Verified Certificate link on the right side of the course's Home tab inside of the course.
Click the Checkout button to pay by credit or debit card or the Checkout with PayPal button.
If this is your first upgrade you will then take the two verification photos with your webcam— one photo will be of yourself, and the second photo will be of a government-issued photo identification card that has your name and photo on the same side.
You can check the status of your verification via your dashboard. Approval generally takes 2-3 business days and you are welcome to start your course while this is pending.