Webhooks

Webhooks allow your external applications to receive real-time notifications when events occur on your Euron Systems platform. Instead of polling the API, webhooks push data to your server.

Setting Up Webhooks

  1. Go to Settings → API → Webhooks.
  2. Click Add Webhook Endpoint.
  3. Enter:
    • URL — Your server's endpoint that will receive webhook events
    • Events — Select which events to subscribe to
    • Secret — A shared secret for verifying webhook signatures
  4. Click Save.

Available Events

Student Events

EventTrigger
student.registeredNew student registers
student.updatedStudent profile updated
student.deletedStudent account deleted

Enrollment Events

EventTrigger
enrollment.createdStudent enrolls in a course
enrollment.completedStudent completes a course
enrollment.expiredCourse access expires

Payment Events

EventTrigger
payment.completedSuccessful payment
payment.failedFailed payment attempt
payment.refundedRefund processed
subscription.createdNew subscription started
subscription.renewedSubscription renewed
subscription.cancelledSubscription cancelled

Course Events

EventTrigger
course.publishedCourse published
course.updatedCourse details updated
lesson.completedStudent completes a lesson
quiz.submittedStudent submits a quiz
certificate.issuedCertificate generated

Webhook Payload

Each webhook event sends a JSON payload:

{
  "id": "evt_abc123",
  "event": "enrollment.created",
  "created_at": "2025-03-20T10:30:00Z",
  "data": {
    "student_id": "student_xyz789",
    "student_name": "Priya Sharma",
    "student_email": "priya@example.com",
    "course_id": "course_abc123",
    "course_title": "Complete Python Bootcamp",
    "enrolled_at": "2025-03-20T10:30:00Z"
  }
}

Verifying Signatures

Every webhook request includes an X-Webhook-Signature header. Verify it to ensure the request is authentic:

const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Retry Policy

If your endpoint returns a non-2xx status code, the webhook is retried:

  • Retry 1 — After 1 minute
  • Retry 2 — After 5 minutes
  • Retry 3 — After 30 minutes
  • Retry 4 — After 2 hours
  • Retry 5 — After 24 hours

After 5 failed attempts, the webhook is marked as failed. You can manually retry from the webhook dashboard.

Was this page helpful? Contact us at support@euronsystems.com