Webhook Events

Webhook Events

Events are actions initiated by the API that triggers the webhook automatically, when this happens, Curacel submits a POST request to the designated Webhook URL with information about the event transactions.

EventDescription
policy.createdAn insurance policy was created for your order
discharge_voucher.createdA discharge voucher was issued for your claim

Below are example responses returned by the two events on the webhook.

{
  "event":"policy.created",
  "data":{
    "id":16,
    "number":"343473",
    "description":null,
    "start_date":"2022-08-24T00:00:00.000000Z",
    "end_date":"2022-09-10T00:00:00.000000Z",
    "status":null,
    "insurer":{
      "id":3,
      "code":"OM",
      "name":"OLD MUTUAL",
      "currency":"NGN"
    },
    "customer":{
      "id":65,
      "ref":"Curacel_65",
      "first_name":"Emeka",
      "last_name":"Adirije",
      "birth_date":"2006-08-15T00:00:00.000000Z",
      "email":"[email protected]",
      "phone":"08123456789"
    },
    "document":{
      "name":"curacel_343473.jpg",
      "download":"https:\/\/api.playbox.grow.curacel.co\/api\/v1\/policies\/16\/doc"
    },
    "order":{
      "id":129,
      "amount_due":9750.54,
      "premium": 10000,
      "asset_ref":null,
      "status":"policy_created",
      "currency":"NGN",
      "channel":"Dashboard"
    }
  }
}
{
  "event":"discharge_voucher.created",
  "data":{
    "id":7,
    "amount":45000,
    "curency":"NGN",
    "created_at":"2022-08-05T06:17:17.000000Z",
    "claim":{
      "id":18,
      "status":"discharge voucher",
      "amount_requested":"55000.00",
      "currency":"NGN",
      "created_at":"2022-08-05T06:17:17.000000Z"
    },
    "policy":{
      "id":16,
      "number":"343473",
      "start_date":"2022-08-24T00:00:00.000000Z",
      "end_date":"2022-09-10T00:00:00.000000Z",
      "status":null,
      "created_at":"2022-08-05T04:54:35.000000Z"
    },
    "document":{
      "name":"claim_18_dv_GRu7W.jpg",
      "download":"https:\/\/api.playbox.grow.curacel.co\/api\/v1\/claims\/18\/discharge-voucher\/7"
    }
  }
}
{
  "event": "discharge_voucher.paid",
  "data": {
    "id": 15,
    "amount": 56454,
    "curency": "NGN",
    "created_at": "2022-07-07T12:13:57.000000Z",
    "claim": {
      "id": 4,
      "status": "settled",
      "amount_requested": "700.00",
      "currency": "NGN",
      "created_at": "2022-07-07T12:13:57.000000Z"
    },
    "policy": {
      "id": 2,
      "number": "9877",
      "start_date": "2022-03-18T00:00:00.000000Z",
      "end_date": "2022-03-20T00:00:00.000000Z",
      "status": "expired",
      "created_at": "2022-03-19T14:37:46.000000Z"
    },
    "customer": {
      "id": 1,
      "ref": "PartnerOne_1",
      "first_name": "John",
      "last_name": "Bull",
      "birth_date": "1990-10-25",
      "email": "[email protected]",
      "phone": "+2348162956392",
      "sex": null
    },
    "document": {
      "name": "claim_4_dv_inIq9.jpg",
      "download": "https://grow-api.test/api/v1/claims/4/discharge-voucher/15"
    },
    "attachments": [
      {
        "id": 81,
        "description": null,
        "file_name": "2023-03-15T11_36_11.192Z.csv",
        "download": "http://grow-api.test/api/v1/attachments/81"
      }
    ]
  }
}
{
  "event": "claim.settled",
  "data": {
    "id": 4,
    "status": "settled",
    "amount_requested": "700.00",
    "amount_approved": "56454.00",
    "currency": "NGN",
    "insurer_comment": null,
    "created_at": "2022-07-07T12:13:57.000000Z",
    "policy": {
      "id": 2,
      "number": "9877",
      "start_date": "2022-03-18T00:00:00.000000Z",
      "end_date": "2022-03-20T00:00:00.000000Z",
      "status": "expired"
    },
    "customer": {
      "id": 1,
      "ref": "PartnerOne_1",
      "first_name": "John",
      "last_name": "Bull",
      "birth_date": "1990-10-25T00:00:00.000000Z",
      "email": "[email protected]",
      "phone": "+2348162956392"
    }
  }
}