This notification webhook will be triggered every time there is any change in application status. Please refer to Insurance Application Status section for each status details and for the detailed flow refer to Insurance Activation Flow, Insurance Activation Flow for Incomplete Data, Insurance Cancellation Flow sections
Callback URL
Each partner can configure a callback URL for insurance applications webhook.
POST {partner-url-path}
partner-url-path = URL from partner to receive webhook notification
The configuration can be done through Subscription API and Unsubscription API
Webhook Signature
Partners can optionally verify the authenticity of notifications sent by Cermati. A signature will be included in as a Cermati-Signature header request with the following format
Cermati-Signature: {prefix}={signature-value}
Example:
Cermati-Signature: v1=6ffbb59b2300aae63f272406069a9788598b792a944a07aba816edb039989a39
The prefix will be used as a versioning mechanism for the signature.
The signature value is generated using HMAC SHA256 as below.
signature = SHA256(trxId + updatedAt, secretKey)
trxId = insurance transaction ID
updatedAt = ISO Timestamp with timezone offset, of the updated status
secretKey = key will provided by Cermati during the integration process
Webhook Request
Each time a status is updated then a request with the following details will be made against the specified Callback URL.
Headers
The following are the details of the request headers of the webhook.
Header | Expected Value |
---|---|
Cermati-Signature | Refer to Signature section |
Content-Type | application/json |
Body
The following are the details of the request body of the webhook.
Object Fields | Type | Required | Description |
---|---|---|---|
refNo | string | yes | Unique identifier from the partner, this must be unique per application. |
trxId | string | yes | Application transaction Id |
status | string | yes | The status of the application Refer to Insurance Application Status section |
link | string | yes | Link to retrieve the resource. {BASE_URL}/{productType}/{trxId} e.g. https://api.cermati.com/insurance/v1/goods/UniqueTrxId00001 |
updatedAt | string | yes | Timestamp of the status change occured (ISO 8601 format with timezone) |
Webhook Response
HTTP response status code from partner will be tracked and
- HTTP status code 200 will be acknowledged by Cermati as notification successfully received. No retry will be done.
- Other HTTP status code will be marked as failed and will be retried. Request will be retried up to 8 times with exponential backoff interval.