Svix

Kable Webhook Event Types

This is the list of event types that we currently send. For guidance on how to listen to these events, take a look at Svix's guide to consuming webhooks.

credit.balance.below

A customer's credit balance has dropped below a given threshold.

Example
JSON
{
  "alertId": "alt_a404cbea85f24a96a20760a4f7ee5400",
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "credit.balance.below",
  "message": "You've used all of your credits for the month",
  "metadata": {
    "foo": "bar",
    "yourKey": "yourValue"
  },
  "name": "Credits Consumed",
  "severity": "MEDIUM",
  "threshold": 0
}

customer.bundles.added

A bundle was added to a customer on Kable.

Example Customer Bundle
JSON
{
  "bundles": [
    {
      "bundleId": "bun_23c523326c694beca15f9657a1ff9f1a",
      "externalId": "yourcompany_bundle456",
      "metadata": {
        "foo": "bar"
      },
      "name": "Starter Bundle"
    }
  ],
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.plans.added",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

customer.bundles.removed

A bundle was removed from a customer on Kable.

Example Customer Bundle
JSON
{
  "bundles": [
    {
      "bundleId": "bun_23c523326c694beca15f9657a1ff9f1a",
      "externalId": "yourcompany_bundle456",
      "metadata": {
        "foo": "bar"
      },
      "name": "Starter Bundle"
    }
  ],
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.plans.added",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

customer.cancelled

A customer was cancelled on Kable.

Example Customer
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.cancelled",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

customer.created

A customer was created on Kable.

Example Customer
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.created",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

customer.plans.added

A plan was added to a customer on Kable.

Example Customer Plan
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.plans.added",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

customer.plans.removed

A plan was removed from a customer on Kable.

Example Customer Plan
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.plans.removed",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

customer.updated

A customer was updated on Kable.

Example Customer
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "customer.updated",
  "plans": [
    {
      "externalId": "yourcompany_plan123",
      "metadata": {
        "foo": "bar"
      },
      "name": "Requests Usage Plan",
      "planId": "pln_a23e148584d0463482c961b7f62f824c"
    }
  ],
  "status": "ACTIVE"
}

invoice.created

An invoice was created for a customer on Kable.

Example Invoice
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "invoice.created",
  "invoiceId": "inv_1b2c1f27456e48f78f8d902d5da97fbf",
  "status": "PENDING",
  "totalAmount": 254.86
}

invoice.paid

An invoice was paid for a customer on Kable.

Example Invoice
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "invoice.paid",
  "invoiceId": "inv_1b2c1f27456e48f78f8d902d5da97fbf",
  "status": "PAID",
  "totalAmount": 254.86
}

invoice.payment_failed

An invoice payment failed for a customer on Kable.

Example Invoice
JSON
{
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "currency": "USD",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "environment": "LIVE",
  "eventType": "invoice.payment_failed",
  "invoiceId": "inv_1b2c1f27456e48f78f8d902d5da97fbf",
  "status": "FAILED",
  "totalAmount": 254.86
}

usage.exceeded

A customer's usage has exceeded a given threshold.

Example
JSON
{
  "aggregation": "COUNT",
  "alertId": "alt_a404cbea85f24a96a20760a4f7ee5400",
  "clientId": "yourcompanyuser_1234567890",
  "companyName": "Awesome Corp",
  "customerId": "cus_8276e1ac8ed84d21c64f31ae0082fe",
  "dimension": {
    "dimensionId": "dim_c5f32b8cd8934356b5167a3b2c6c6314",
    "key": "messageId",
    "name": "Message"
  },
  "environment": "LIVE",
  "eventType": "usage.exceeded",
  "message": "You've used 80% of your messages for the month",
  "metadata": {
    "foo": "bar",
    "yourKey": "yourValue"
  },
  "name": "Message Quota Approaching",
  "severity": "MEDIUM",
  "threshold": 10000
}