To receive these notifications, you will need a POST endpoint on your server that can be called by our system to send you notifications.
To enable Webhooks, please follow the steps below:
Log in to your Distributor dashboard. Then, click on the settings icon to navigate to the settings page.

At the bottom, you will find the form to enter and save your webhook URL. Make sure to enable webhooks by toggling the switch on.

You can effortlessly verify webhooks received from the MyCover.ai platform by following these steps:
Signature Inclusion: Every sent webhook includes a signature in the headers. This signature is the encrypted webhook data using the merchant's (i.e Distributor) private secret API key.
Validation on Merchant's End: Merchants can follow the same encryption steps using their secret API key. Then, they can compare the created signature with the one they received. If the signatures are the same, it's safe to go ahead and use the webhook information. However, if the signatures don't match, they should ignore the webhook and not use the information it carries.
const crypto = require("crypto");
const secretKey = 'MCASECK|49939d32-f649-4de4-ab35-51060ca292f9';
const signature = crypto
.createHmac("sha512", secretKey)
.update(JSON.stringify(req.body))
.digest("hex");
if (req.headers['x-mycoverai-signature'] === signature) {
const event = req.body;
// Do something with event - that will not take long
// Return Ok
res.send(200);
}
import json
import hashlib
import hmac
secret_key = 'MCASECK|49939d32-f649-4de4-ab35-51060ca292f9'
json_payload = json.dumps(req_body, separators=(',', ':'))
secret_key_bytes = secret_key.encode()
hmac_obj = hmac.new(secret_key_bytes, digestmod=hashlib.sha512)
hmac_obj.update(json_payload.encode())
signature = hmac_obj.hexdigest()
if req.headers.get('x-mycoverai-signature') == signature:
print('Do something with req_body')
# Return Ok
This webhook event is triggered when a client initiates a policy purchase, and the transaction is successfully completed.
{
"event": "purchase.successful",
"data": {
"id": "e431432e-3daa-11ee-be56-0242ac120002",
"amount": 5000,
"status": "successful",
"reference": "BUY-PSKUEVZSSXVJRPQX",
"customer": {
"id": "db0c25ae0-3dab-11ee-be56-0242ac120002",
"first_name": "Jack",
"last_name": "Olu",
"email": "[email protected]",
"phone": "+2349162753630",
},
"product_id": "280798d6-3dac-11ee-be56-0242ac120002",
"created_at": "2023-08-18T09:47:22.008Z",
"updated_at": "2023-08-18T09:47:22.008Z",
"policy_expiry_date": "2023-09-18T09:47:22.008Z",
},
}
This webhook event is triggered when a client initiates a policy renewal, and the transaction is successfully completed.
{
"event": "renewal.successful",
"data": {
"id": "e431432e-3daa-11ee-be56-0242ac120002",
"amount": 5000,
"status": "successful",
"reference": "BUY-PSKUEVZSSXVJRPQX",
"customer": {
"id": "db0c25ae0-3dab-11ee-be56-0242ac120002",
"first_name": "Jack",
"last_name": "Olu",
"email": "[email protected]",
"phone": "+2349162753630",
},
"product_id": "280798d6-3dac-11ee-be56-0242ac120002",
"created_at": "2023-08-18T09:47:22.008Z",
"updated_at": "2023-08-18T09:47:22.008Z",
"policy_expiry_date": "2023-09-18T09:47:22.008Z",
},
}
Auxiliary
Find additional API endpoints for fetching or posting auxiliary data as a complement to other APIs.
Messaging
When you integrate our SDK or API as a distributor, we provide additional communication options for you, to your customers. This includes notifying them about purchases, activations, and renewals through various channels such as email or SMS.