API Reference / Webhooks

Webhook events

Use webhook subscriptions to receive asynchronous updates for customers, rate quotes, applications, and manual test deliveries.

Delivery format is stable: each POST includes a signed event envelope and webhook headers so your endpoint can verify authenticity and process idempotently.

Quick integration checklist

  • Create an endpoint URL that accepts authenticated HTTPS POST requests.
  • Capture the raw request body before parsing JSON.
  • Verify the signature using timestamp + delivery id + raw payload.
  • Use delivery id as your idempotency key for dedupe.
  • Return 2xx only after processing is persisted successfully.

Event envelope

Every webhook body is JSON with a top-level envelope:

{
  "id": "evt_0f4f0f7e-c838-4d1a-9da5-f7dce8cd7f0d",
  "type": "application.created",
  "createdAt": "2026-04-19T15:20:10.000Z",
  "data": {
    "id": "app_123",
    "status": "submitted",
    "submissions": []
  }
}

Event catalog

data mirrors the object family returned by related public API resources.

  • POSTcustomer.created

    Triggered when a customer profile is created through the Developer API.

    {
      "id": "cust_123",
      "externalRef": "crm-4451",
      "fullName": "Jane Driver",
      "email": "jane@example.com",
      "phone": "+1-555-0100",
      "notes": "Returning customer",
      "metadata": {
        "vip": true
      },
      "createdAt": "2026-04-19T14:22:11.000Z",
      "updatedAt": "2026-04-19T14:22:11.000Z"
    }
  • POSTcustomer.updated

    Triggered when a customer profile is updated through the Developer API.

    {
      "id": "cust_123",
      "externalRef": "crm-4451",
      "fullName": "Jane Driver",
      "email": "jane+new@example.com",
      "phone": "+1-555-0100",
      "notes": "Email updated from CRM sync",
      "metadata": {
        "vip": true
      },
      "createdAt": "2026-04-19T14:22:11.000Z",
      "updatedAt": "2026-04-19T15:03:41.000Z"
    }
  • POSTrate_quote.completed

    Triggered after a Developer API quote request completes and offers are available.

    {
      "id": "quote_123",
      "customerId": "cust_123",
      "status": "completed",
      "vehicle": {
        "year": 2024,
        "make": "Honda",
        "model": "Civic",
        "mileage": 12500,
        "bookValue": 25500,
        "salePrice": 26200,
        "invoicePrice": 24800
      },
      "financing": {
        "amountRequested": 24000,
        "downPayment": 2000,
        "termMonths": 72,
        "creditScore": 720,
        "loanToValue": 94.1
      },
      "offers": [
        {
          "id": "offer_987",
          "lenderId": "lender_abc",
          "lenderName": "Example Credit Union",
          "status": "available",
          "apr": 6.49,
          "termMonths": 72,
          "monthlyPayment": null,
          "notes": "Top tier approval"
        }
      ],
      "createdAt": "2026-04-19T15:10:00.000Z",
      "updatedAt": "2026-04-19T15:10:00.000Z"
    }
  • POSTapplication.created

    Triggered when an application is created from selected quote offers.

    {
      "id": "app_123",
      "customerId": "cust_123",
      "quoteId": "quote_123",
      "offerIds": [
        "offer_987"
      ],
      "status": "submitted",
      "notes": "Customer approved to submit today",
      "submissions": [
        {
          "id": "submission_1",
          "lenderId": "lender_abc",
          "lenderName": "Example Credit Union",
          "status": "submitted",
          "externalReference": null,
          "notes": null,
          "updatedAt": "2026-04-19T15:20:10.000Z"
        }
      ],
      "createdAt": "2026-04-19T15:20:10.000Z",
      "updatedAt": "2026-04-19T15:20:10.000Z"
    }
  • POSTapplication.updated

    Triggered when an application-level status or notes are updated.

    {
      "id": "app_123",
      "customerId": "cust_123",
      "quoteId": "quote_123",
      "offerIds": [
        "offer_987"
      ],
      "status": "in_review",
      "notes": "Waiting on additional stips",
      "submissions": [
        {
          "id": "submission_1",
          "lenderId": "lender_abc",
          "lenderName": "Example Credit Union",
          "status": "in_review",
          "externalReference": null,
          "notes": "Need proof of income",
          "updatedAt": "2026-04-19T16:01:02.000Z"
        }
      ],
      "createdAt": "2026-04-19T15:20:10.000Z",
      "updatedAt": "2026-04-19T16:01:02.000Z"
    }
  • POSTapplication.lender_updated

    Triggered when a lender-level submission decision/notes are updated.

    {
      "id": "app_123",
      "customerId": "cust_123",
      "quoteId": "quote_123",
      "offerIds": [
        "offer_987"
      ],
      "status": "approved",
      "notes": "Approved by primary lender",
      "submissions": [
        {
          "id": "submission_1",
          "lenderId": "lender_abc",
          "lenderName": "Example Credit Union",
          "status": "approved",
          "externalReference": null,
          "notes": "Approved with standard stip package",
          "updatedAt": "2026-04-19T16:30:00.000Z"
        }
      ],
      "createdAt": "2026-04-19T15:20:10.000Z",
      "updatedAt": "2026-04-19T16:30:00.000Z"
    }
  • POSTwebhook.test

    Triggered when a manual test delivery is sent from endpoint management.

    {
      "label": "Production receiver",
      "url": "https://integrator.example.com/karliro/webhooks",
      "test": true
    }

Delivery headers

HeaderExampleMeaning
content-typeapplication/jsonWebhook payload format.
x-karliro-webhook-signaturev1=<hex_hmac_sha256>HMAC signature for timestamp.deliveryId.payload using your endpoint secret.
x-karliro-webhook-timestamp<unix_seconds>Unix timestamp used in signature generation.
x-karliro-webhook-delivery-id<uuid>Unique idempotency key for one delivery attempt.
x-karliro-webhook-event<event_type>Event name (for example, application.created).

Signature verification basics

  • Read the raw request body as a string before JSON parsing so signature input stays exact.
  • Build signed content as ${timestamp}.${deliveryId}.${rawPayload}.
  • Compute HMAC SHA-256 with your endpoint secret, compare to `x-karliro-webhook-signature`.
  • Reject stale timestamps (recommended tolerance: 5 minutes).
  • Store `x-karliro-webhook-delivery-id` to enforce idempotent processing.
  • Return a 2xx response only after durable processing succeeds.
import crypto from 'node:crypto';

export function verifyKarliroWebhook(input: {
  payload: string;
  signatureHeader: string;
  timestampHeader: string;
  deliveryIdHeader: string;
  secret: string;
  toleranceSeconds?: number;
}) {
  const {
    payload,
    signatureHeader,
    timestampHeader,
    deliveryIdHeader,
    secret,
    toleranceSeconds = 300,
  } = input;

  const [version, providedHex] = signatureHeader.split('=');
  if (version !== 'v1' || !providedHex) return false;

  const timestamp = Number(timestampHeader);
  if (!Number.isFinite(timestamp)) return false;

  const ageSeconds = Math.abs(Math.floor(Date.now() / 1000) - timestamp);
  if (ageSeconds > toleranceSeconds) return false;

  const signedPayload = timestampHeader + '.' + deliveryIdHeader + '.' + payload;
  const expectedHex = crypto.createHmac('sha256', secret).update(signedPayload).digest('hex');

  if (!/^[a-f0-9]+$/i.test(providedHex)) return false;
  if (providedHex.length !== expectedHex.length) return false;

  return crypto.timingSafeEqual(Buffer.from(providedHex, 'hex'), Buffer.from(expectedHex, 'hex'));
}

Retries and delivery outcomes

  • Karliro marks delivery as successful when your endpoint returns HTTP 2xx.
  • Non-2xx responses and network failures are retried with backoff.
  • Delivery attempts are capped at 5 total attempts; failed deliveries remain visible in endpoint history.

Operational recommendations

  • Log delivery id, event type, status code, and processing latency for each request.
  • Alert on repeated failed deliveries so endpoint outages are visible quickly.
  • Rotate webhook secrets periodically and after any suspected exposure.
  • Keep verification and dedupe logic in middleware so all event handlers share the same safety checks.

Configure endpoints in webhook management routes, then return here for event semantics and verification guidance. Need route-level payload contracts too? Browse API reference routes.