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. Use this webhook for automated grading, analytics, or tracking lab completion and success rates.Payload Description
Payload Description
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. Useful for automated workflows like sending captions to students, embedding or processing with third-party translation tools.Payload Description
Payload Description
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. This webhook is ideal for workflows that involve video publishing, post-production, or content delivery.Payload Description
Payload Description
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. Use this event to sync sales data, trigger email confirmations, or update your accounting software.Payload Description
Payload Description
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.
5. Payment Failed
Event Trigger: When a payment attempt fails. This webhook helps automate failure handling, retry logic, and notifications to users.Payload Description
Payload Description
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 is useful for abandoned cart notifications or automated reminders.Payload Description
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. This webhook allows automated publishing or notifications to students when video content is ready.Payload Description
Payload Description
videoId
– Unique ID of the video.