Vertical Insure

Webhooks

Our API will publish the following events to registered webhooks. All webhook requests are sent via POST and include a VerticalInsure-Signature header which is an HMAC-SHA256 and can be used to validate the request came from Vertical Insure. The header value is a hash of the webhook's signature_key and the json request body.

Subscribing to Web Hook Events

To create a webhook and subscribe the webhook to certain events, login to our Partner Portal and navigate to the Webhooks page.

Webhooks

Generating Signatures for Validation

Mac mac = HmacUtils.getInitializedMac(HmacAlgorithms.HMAC_SHA_256,
            signatureKey.getBytes(StandardCharsets.UTF_8));
String signature = Hex.encodeHexString(mac.doFinal(eventJson.getBytes(StandardCharsets.UTF_8)));

Types of events

policy_bind_complete

Sent once the policy bind process has been completed.

{
    "event": "policy_bind_complete",
    "webhook": "https://www.example.com/my-webhook",
    "data": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "master_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "policy_number": "string",
        "customer": {
            "first_name": "string",
            "last_name": "string",
            "email_address": "string"
        },
        "policy_status": "ACTIVE",
        "issued_date": "2022-09-05",
        "expiration_date": "2022-09-05",
        "effective_date": "2022-09-05",
        "quote_date": "2022-09-05",
        "policy_attributes": {},
        "premium_amount": 0,
        "quote_id": "string",
        "is_test": true
    }
}

policy_bind_failed

Sent once the policy bind process has been completed.

{
    "event": "policy_bind_failed",
    "webhook": "https://www.example.com/my-webhook",
    "data": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "master_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "policy_number": "string",
        "customer": {
            "first_name": "string",
            "last_name": "string",
            "email_address": "string"
        },
        "policy_status": "BIND_FAILED",
        "issued_date": "2022-09-05",
        "expiration_date": "2022-09-05",
        "effective_date": "2022-09-05",
        "quote_date": "2022-09-05",
        "policy_attributes": {},
        "premium_amount": 0,
        "quote_id": "string",
        "is_test": true
    }
}

policy_purchase_invalid

This event is similar to the policy_bind_failed event but is sent when a batch purchase is made and 1 or more policies in the batch failed to bind.

{
    "event": "policy_purchase_invalid",
    "webhook": "https://www.example.com/my-webhook",
    "data": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "master_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "policy_number": "string",
        "customer": {
            "first_name": "string",
            "last_name": "string",
            "email_address": "string"
        },
        "policy_status": "PENDING",
        "issued_date": "2022-09-05",
        "expiration_date": "2022-09-05",
        "effective_date": "2022-09-05",
        "quote_date": "2022-09-05",
        "policy_attributes": {},
        "premium_amount": 0,
        "quote_id": "string",
        "is_test": true
    }
}

policy_payment_failed

Sent when a payment for a policy purchase fails.

{
    "event": "policy_payment_failed",
    "webhook": "https://www.example.com/my-webhook",
    "data": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "master_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "policy_number": "string",
        "customer": {
            "first_name": "string",
            "last_name": "string",
            "email_address": "string"
        },
        "policy_status": "REQUIRES_PAYMENT",
        "issued_date": "2022-09-05",
        "expiration_date": "2022-09-05",
        "effective_date": "2022-09-05",
        "quote_date": "2022-09-05",
        "policy_attributes": {},
        "premium_amount": 0,
        "quote_id": "string",
        "is_test": true
    }
}

policy_canceled

Sent when a policy is canceled.

{
    "event": "policy_canceled",
    "webhook": "https://www.example.com/my-webhook",
    "data": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "master_policy_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "policy_number": "string",
        "customer": {
            "first_name": "string",
            "last_name": "string",
            "email_address": "string"
        },
        "policy_status": "CANCELED",
        "issued_date": "2022-09-05",
        "expiration_date": "2022-09-05",
        "effective_date": "2022-09-05",
        "quote_date": "2022-09-05",
        "policy_attributes": {},
        "premium_amount": 0,
        "quote_id": "string",
        "is_test": true
    }
}

policy_endorsed

Published when an endorsement policy is purchased.

{
    "event": "policy_endorsed",
    "webhook": "https://www.example.com/my-webhook",
    "data": {
        "previous_policy": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "policy_number": "string",
            "policy_status": "ACTIVE",
            "issued_date": "2022-09-05T00:00:00Z",
            "expiration_date": "2022-10-05",
            "effective_date": "2022-09-05",
            "quote_date": "2022-09-05T00:00:00Z",
            "policy_attributes": {},
            "premium_amount": 5000,
            "endorsement_price_changes": 0,
            "currency": "USD",
            "total": 5000,
            "version": 1,
            "quote_id": "string",
            "is_test": true
        },
        "current_policy": {
            "id": "1c2b3a4d-1111-2222-3333-444455556666",
            "policy_number": "string",
            "policy_status": "ACTIVE",
            "issued_date": "2022-09-05T00:00:00Z",
            "expiration_date": "2022-10-05",
            "effective_date": "2022-09-05",
            "quote_date": "2022-09-05T00:00:00Z",
            "policy_attributes": {},
            "premium_amount": 6500,
            "endorsement_price_changes": 1500,
            "currency": "USD",
            "total": 6500,
            "version": 2,
            "quote_id": "string",
            "is_test": true
        }
    }
}

payout_report_published

Sent when a new payout report is available.

{
    "event": "payout_report_published",
    "webhook": "https://www.example.com/my-webhook",
    "data": null
}

payout_payment_sent

Sent when a payout payment is transfered.

{
    "event": "payout_payment_sent",
    "webhook": "https://www.example.com/my-webhook",
    "data": null
}

Webhook Logs

After creating a webhook, you can view delivery logs from the webhook actions menu by selecting Logs.

Webhook Logs Menu

Webhook logs include the event, timestamp, status code, and request body for each delivery attempt.

Webhook Logs

On this page