Skip to content
Overview: sell a course

Selling a Course

A paid course needs three things from its video host: lessons that play only for students who paid, a record of how much of each lesson every student has played, and resume where they stopped. The hosted player does all three. Your site keeps the students, the payments and the decision of who gets in.

This page is the map; each step links to the guide with the code.

The quick path

  1. Upload the lessons as private. Set Who can watch to Private. A private video never plays without a token from your site and has no public embed code. Put the same tag on every lesson of a course (say course-a): a course is a tag, and the course reports read it.
  2. Let your site decide who gets in. Open the app, then Playback security, and create a playback signing key. When a signed-in student opens a lesson, your server signs a short-lived playback token for that student and lesson and adds it to the player’s address. Use your own user id as the viewer id, never an email address. See Protected Playback.
  3. Track what each student played. Add the player script, player.v1.js, to the lesson page. It fires completed once the student has played enough of the lesson (90% by default; seeking ahead does not count). With a viewer id in the token, progress is stored on our side too: the lesson resumes on any device, and your server gets a video.viewer.completed webhook. See Course Progress.
  4. Connect your payment tool. It says who paid; your server checks that before it signs a token. Sell Access to Videos has recipes for Stripe and Polar.

What you get back

  • A player address per student and lesson that plays until its token expires: 4 hours by default, 24 hours at most.
  • The completed event in the page, for the interface: tick the lesson, enable the next one.
  • Per-student records: share played, completed or not, and where to resume. A lesson’s Viewers tab lists its students, and Videos → Course progress rolls a course up by its tag and exports CSV. See Course reports.

On WordPress

The beta Transcodely Video for WordPress plugin signs tokens on your server, has access rules per embed (WooCommerce buyers and MemberPress members among them), and marks Tutor LMS and LifterLMS lessons complete once the video has been played. Install the zip from its GitHub releases page; it is not in the wordpress.org directory, and it has not yet been run against the live Transcodely API. Other course plugins: WordPress learning management systems.

What can go wrong

  • The player says “This video is unavailable”. The token is missing, expired, for another video, or signed with a key that expired after a rotation. A private video without a valid token always gets this page, with status 404.
  • A refunded student can still play for a while. A token cannot be revoked on its own; it expires. Your server stops signing new ones at the next page load, so keep lifetimes short if that matters.
  • No progress for a student. It is stored only when the token has a viewer id. Without one, resume works from the browser on the same device only.
  • Completion is not proof of attention. The server limits how fast played time grows but cannot tell whether anyone was looking. Add a quiz if a certificate depends on it.
  • It is not DRM (digital rights management). A student with a valid token can record the screen. An optional overlay, such as their email over the video, is a deterrent.

Next steps

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.