Webhooks

Outbound webhooks and inbound webhook integrations

Outbound Webhooks

Configure outbound webhooks at Admin > Webhooks to notify external systems when events occur in OptiCRM.

Creating a Webhook

  1. Navigate to Admin > Webhooks
  2. Click Create Webhook
  3. Configure:
    • URL — The endpoint to receive events
    • Events — Which events trigger the webhook
    • Secret — Used to sign payloads for verification
    • Active — Enable/disable toggle

Webhook Payload

{
  "event": "student.created",
  "timestamp": "2026-04-11T10:30:00Z",
  "data": {
    "id": "clx...",
    "firstName": "John",
    "lastName": "Smith"
  }
}

Signature Verification

Payloads are signed with HMAC-SHA256. Verify using:

X-Webhook-Signature: sha256=<hmac_hex>

Delivery Tracking

Each webhook delivery is logged with:

  • Status (success/failed)
  • Response code
  • Response body
  • Retry count

Inbound Webhooks

Razorpay

POST /api/webhooks/razorpay

Handles payment captured, failed, and refund events.

Resend (Email)

POST /api/webhooks/resend

Handles email delivered and bounced events. Updates NotificationLog status.

MSG91 (SMS)

POST /api/webhooks/msg91

Handles SMS delivery status callbacks.