Skip to main content
Fermion webhook events include structured payloads to provide all necessary data for your integrations.
Each payload is tailored to the specific event type, making it easy to automate workflows and handle events reliably.
Below is a detailed breakdown of each supported webhook event, including its trigger, TypeScript type, and description of the payload fields.
The Typscript type of a particular event can also be accessed when subscribing to the events

1. Lab Run Tests

Event Trigger: When a user clicks the “Run Tests” button in a lab. Fermion’s interactive coding labs are full-fledged environments that boot up quick and give learners a near VSCode-like developer experience directly in the browser. These labs include an editor, terminal, preview window, and dedicated challenge sections so students can learn by doing, not just by watching. To gather more information about Coding Labs, you can navigate to What are Coding Labs By integrating the Lab Run Tests webhook, you can capture when learners attempt or complete challenges, track their progress, and feed the results into grading systems, analytics dashboards, or custom reporting tools.
type FermionWebhookEventLabRunTestsType = {
  eventUniqueId: string;
  timestampIsoString: string;
  isTestEvent: boolean;
  payload: {
    eventType: "lab-run-tests";
  } & {
    internalUserId: string;
    apiUserId: string | null;
    labId: string;
    challengeResult: {
      isLabAttempted: true;
      result: {
        challengeId: string;
        isChallengePassed: boolean;
        challengeLabel: string;
      }[];
    } | {
      isLabAttempted: false;
    };
  };
}

Payload Data:

  • internalUserId – Fermion’s internal user ID.
  • apiUserId – Your API-facing user ID (if available).
  • labId – Unique identifier for the lab run.
  • challengeResult – Contains lab results:
  • If isLabAttempted: true, result is an array of challenges with their IDs, pass status, and labels.
  • If isLabAttempted: false, no challenges were attempted.

2. Live Event Session Caption Ready

Event Trigger: When captions for a live event session are ready. Fermion automatically generates AI-powered captions for live sessions, synced with the video timeline to improve accessibility and inclusivity. With this webhook, you can programmatically access the generated captions and integrate them into your workflows. You can find more about captions for live events here: Auto-recording & Captions for Live Sessions This webhook is useful for automated workflows like sending captions to students, embedding or processing with third-party translation tools.
type FermionWebhookEventLiveEventSessionCaptionReadyType = {
    eventUniqueId: string;
    timestampIsoString: string;
    isTestEvent: boolean;
    payload: {
        eventType: "live-event-session-caption-ready";
    } & {
        liveEventId: string;
        liveEventSessionId: string;
        captionEnglishDownloadUrl: string;
    };
}
Payload Data:
  • liveEventId – Unique ID of the live event.
  • liveEventSessionId – ID of the specific session.
  • captionEnglishDownloadUrl – URL to download the English captions.

3. Live Event Session Processed MP4 Ready

Event Trigger: When a live event’s processed MP4 video is ready. After a live session concludes, Fermion automatically generates a processed MP4 recording that can be accessed by students. This ensures that learners who couldn’t attend live can still benefit from the session. The recording typically takes a very short time to process, depending on factors such as the duration of the session and the number of participants. As soon as the recording is processed, this webhook event is triggered.
If you want students to be able to download the recordings of your lifestreams, you have to enable that feature in instructor dashboard. You can find out how to do that here: Auto Recording
This webhook is useful for automating tasks like publishing recordings, delivering content to external systems, or archiving sessions for future use.
type FermionWebhookEventLiveEventSessionProcessedMp4ReadyType = {
    eventUniqueId: string;
    timestampIsoString: string;
    isTestEvent: boolean;
    payload: {
        eventType: "live-event-session-processed-mp4-ready";
    } & {
        liveEventId: string;
        liveEventSessionId: string;
        downloadUrl1080p: string;
    };
}
Payload Data:
  • liveEventId – Unique ID of the live event.
  • liveEventSessionId – ID of the session.
  • downloadUrl1080p – URL to download the processed video in 1080p resolution.

4. Paid Digital Product Sale

Event Trigger: When a user purchases a paid product. Fermion allows schools to sell a variety of digital products such as E-books, downloadable products, premium resources, or add-on learning materials. This webhook is fired whenever a student completes a purchase of a paid digital product. you can use this event to sync sales data, trigger email confirmations, or update your accounting software.



type FermionWebhookEventPaidDigitalProductSaleType = {
    eventUniqueId: string;
    timestampIsoString: string;
    isTestEvent: boolean;
    payload: {
        eventType: "paid-digital-product-sale";
    } & {
        userId: string;
        userFullname: string;
        userEmail: string | null;
        userPhoneNumber: string | null;
        paymentGateway: "Paypal" | "PhonePe" | "Razorpay" | "SelfRazorpay" | "Stripe" | "FermionUpi";
        chargedAmountInrPaise: number;
        productSlug: string;
        productName: string;
        additionalDataToCollectOnCheckoutResponses?: ({
            [x: string]: unknown;
        } | null) | undefined;
    };
}

Payload Data:
  • userId, userFullname, userEmail, userPhoneNumber – User details.
  • paymentGateway – Gateway used (e.g., FermionUpi, Paypal, Stripe, Razorpay).
  • chargedAmountInrPaise – Amount charged in paise (1 INR = 100 paise).
  • productSlug, productName – Identifiers for the purchased product.
  • additionalDataToCollectOnCheckoutResponses – This field contains any custom data you’ve chosen to collect from the user during checkout.
    For example, if your checkout form asks for extra information like “Field of Study,” “Counsellor ID,” or other custom fields, the responses will appear here as key-value pairs.
    Example:
    
      "additionalDataToCollectOnCheckoutResponses": {
        "Field of Study": "Information Technology",
        "Counsellor ID": "2010MP4"
      }
    

5. Payment Failed

Event Trigger: When a payment attempt fails. This event is triggered anytime a student tries to pay for a course but the transaction fails due to various reasons. You can gather information like User Details, Payment Gateway information, amount in INR paise for the attempted transaction and Course details for which the payment was being made.
type FermionWebhookEventPaymentFailedType = {
    eventUniqueId: string;
    timestampIsoString: string;
    isTestEvent: boolean;
    payload: {
        eventType: "payment-failed";
    } & {
        userId: string | null;
        userFullname: string;
        userEmail: string;
        userPhoneNumber: string | null;
        paymentGateway: "Paypal" | "PhonePe" | "Razorpay" | "Stripe" | "FermionUpi" | "SelfRazorpay";
        attempedChargeAmountInrPaise: number;
        courseSlug: string;
        courseName: string;
    };
}
Payload Data:
  • userId, userFullname, userEmail, userPhoneNumber – User details.
  • paymentGateway – Gateway used for the attempt.
  • attempedChargeAmountInrPaise – Amount attempted.
  • courseSlug, courseName – Course for which the payment failed.

6. Payment Initiated But Never Completed

Event Trigger: When a payment is started but not completed within 60 minutes. This event captures situations where a student begins the checkout process but abandons it before finishing it in under 60 minutes - commonly known as an “abandoned cart This could happen if the user gets distracted, changes their mind, or encounters a technical/payment issue. This event webhook can be utilized for abandoned cart notifications or automated reminders.
type FermionWebhookEventPaymentInitiatedButNeverCompletedType = {
    eventUniqueId: string;
    timestampIsoString: string;
    isTestEvent: boolean;
    payload: {
        eventType: "payment-initiated-but-never-completed";
    } & {
        userId: string | null;
        userFullname: string;
        userEmail: string;
        userPhoneNumber: string | null;
        paymentGateway: ("Paypal" | "PhonePe" | "Razorpay" | "Stripe" | "FermionUpi") | null;
        attempedChargeAmountInrPaise: number | null;
        courseSlug: string;
        courseName: string;
    };
}
Payload Description:
  • userId, userFullname, userEmail, userPhoneNumber – User details.
  • paymentGateway – Gateway used (nullable if unknown).
  • attempedChargeAmountInrPaise – Amount attempted (nullable if unknown).
  • courseSlug, courseName – Course attempted.

7. Recorded Video Ready for Playback

Event Trigger: When a video uploaded to Fermion is ready for playback. Fermion automatically transcodes and optimizes every uploaded video to ensure smooth delivery across devices and bandwidths. Once the processing is complete, this webhook is fired so you can trigger automated actions such as notifying students. Learn more about Recorded Videos here: Recorded Videos
type FermionWebhookEventRecodedVideoReadyForPlaybackType = {
    eventUniqueId: string;
    timestampIsoString: string;
    isTestEvent: boolean;
    payload: {
        eventType: "recoded-video-ready-for-playback";
    } & {
        videoId: string;
    };
}
Payload Description:
  • videoId – Unique ID of the video.