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.
Event | Description |
---|---|
policy.created | An insurance policy was created for your order. Note that you may receive two versions of this event. If this happens, the version that contains the provider:insurer field should take precedence. |
discharge_voucher.created | A discharge voucher was issued for your claim |
discharge_voucher.paid | The accepted discharge voucher has been paid |
claim.settled | A claim has been settled. Typically fired after the claim's voucher has been paid |
order.cancelled | An order was cancelled. |
instalment.due | Your card is about to be charged for a recurring policy payment. Return a 2XX status to authorise the charge. |
Below are examples data contained in the webhook events.
- Policy Created
- Discharge Voucher Created
- Discharge Voucher Paid
- Claim Settled
- Order Canceled
- Instalment Due
{
"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,
"provider": "Curacel",
"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":"emeka.adirije@example.com",
"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": "prof@example.com",
"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": "prof@example.com",
"phone": "+2348162956392"
}
}
}
{
"event": "order.cancelled",
"data": {
"reason_for_cancellation": "Lorem ipsum...",
"order": {
"id": 340,
"amount_due": 172.8,
"asset_ref": null,
"status": "cancelled",
"currency": "GHS",
"channel": "Dashboard",
"premium": 180,
"payment_made_at": "2023-06-16T13:34:04.000000Z",
"policy_start_date": "2023-06-16T00:00:00.000000Z",
"meta": {
"asset_value": 30000,
"broker_taxes": null,
"loan_duration": "12",
"maturity_date": "2024-06-16",
"business_address": "Ol",
"nature_of_business": "Insurance Tech",
"broker_premium_rate": null,
"monthly_loan_instalment": 1500,
"reason_for_cancellation": "Lorem ipsum..."
}
},
"customer": {
"id": 94,
"ref": "64660ae689230",
"first_name": "Mel",
"last_name": "Zedek",
"birth_date": "2023-04-13T00:00:00.000000Z",
"email": "mob@example.com",
"phone": null
}
}
}
{
"event": "instalment.due",
"data": {
"order": {
"id": 426,
"amount_due": 101760,
"asset_ref": null,
"status": "policy_created",
"currency": "GHS",
"premium": 106000,
"payment_made_at": "2023-08-24T08:53:28.000000Z",
"policy_start_date": "2023-01-31T00:00:00.000000Z",
"meta": {
"duration": "12",
"asset_value": null,
"holder_type": "group",
"broker_taxes": null,
"beneficiaries": [
{
"email": "jd@example.com",
"phone": "234354",
"last_name": "Doe",
"first_name": "John",
"percentage_share": 100
}
],
"instalment_amount": 8480,
"life_cover_amount": 1000000,
"premium_frequency": null,
"savings_frequency": "monthly",
"broker_premium_rate": null,
"instalment_frequency": "monthly",
"instalments_completed": false,
"monthly_savings_amount": "8000",
"current_health_condition": "healthy"
}
},
"policy": {
"id": 215,
"number": "CUR/PARTNER-ONE/POLC/INVESTMENT_LIFE/23/426",
"start_date": "2023-01-31T00:00:00.000000Z",
"end_date": "2024-01-31T00:00:00.000000Z",
"status": "active",
"provider": "curacel"
},
"customer": {
"id": 106,
"ref": "2312356",
"first_name": "Jane",
"last_name": "Doe",
"birth_date": "1999-02-01T00:00:00.000000Z",
"email": "j.doe@example.com",
"phone": null
}
}
}