Webhooks
Webhooks are implemented to notify the customer when their onboarding is complete.
On this page
Webhooks
A webhook is a functionality provided by an API (Application Programming Interface) that allows applications to receive real-time data by sending HTTP requests to a specified URL when certain events occur. In our solution it is to notify the customer when their onboarding is complete.
Webhook definition
Webhook parameters should be defined in Integration-Webhooks section of Trusthub Customer Dashboard. There are 2 parameters:
- Webhook URL - the url that will listen for notifications (must be https);
- Onboarding result. It is possible to define a separate endpoint for each status or to send all onboarding statuses to the same endpoint. There are following statuses:
- Auto approved
- Manual approved
- Waiting for manual approve
- Auto rejected
- Manual rejected
Webhook attributes
Each webhook delivers following fields:
Field | Description |
---|---|
sessionId | onboarding session ID |
externalId | optional text field with a 512 character limit. It will only be available if it was passed during session initialization |
status | one of above described statuses: AUTO_APPROVED, MANUAL_APPROVED, WAITING_FOR_MANUAL_APPROVE, AUTO_REJECTED, MANUAL_REJECTED |
Webhook sample
{
"sessionId": "e7abc715e-a674-48ef-a237-1196ab3664e8",
"status": "AUTO_APPROVED",
"externalId": "53421526A"
}