Swagger UI - Agent Notification Callbacks
Notification callbacks are used to notify a broker about the status of an application.
Broker API Service Implementation
As a broker, you have to implement an API choosing one of the callback notifications adapters described below where the noticiations will be sent.
Notification Callbacks Adapters
There are two types of adpaters that a broke can choose from and should implement as an API.
MultiEndpoint : allow to send a notification where a different endpoint should exist for every event types
SingleEndpoint : allow to send callback notifications to a unique endpoint, where the event type is sent as part of the paylod.
API Service authentication
We support the following authentication methods. It is up to you as a broker to decide which one of them to use.
-
Basic access authentication: Agent is providing a username and password, add as Authorization-header with Basic scheme, containing username:pasword as a base64 encoded string.Property Value Description username string the user name password string the password Result header :
Authorization: Basic base64(username:password) -
API Key Auth: Agent is providing a token / apikey, and optionally a scheme, to add as Authorization-header with optional scheme, containing token.Property Value Description token string Token or ApiKey provided by agent scheme string? Name of scheme, could be Bearer. If left out, then schemeless. Result header :
Authorization: Bearer 6736bbb4f4b4ebab8c0df4b139395b9 -
Header ApiKey: Agent is providing an ApiKey, and optionally an apiKeyName, to add as custom header value.Property Value Description apiKey string ApiKey apiKeyName string Optional header name, if left out 'API-KEY' is used. Result header :
API-KEY: 6736bbb4f4b4ebab8c0df4b139395b9Query String Api Key: Agent is providing a apikey, to be added to the endpoint request as querystring parameter.Property Value Description apiKey string ApiKey provided by agent apiKeyName string Optional querystring parameter name, if left out 'API-KEY' is used. Result endpoint :
https://api.example.com/callbacks?API-KEY=6736bbb4f4b4ebab8c0df4b139395b9
Example API and Endpoints
Event types
- Name
approved- Description
Event indicating application has been approved.
- Name
declined- Description
Event indicating application has been declined.
- Name
canceled- Description
Event incicating application has been manually cancelled by Leabank.
- Name
document-sent- Description
Event indicating documents have been sent to customer for singing.
- Name
document-signed- Description
Event indicating documents have been signed by the customer.
- Name
awaiting-confirmation- Description
Event indicating application is waiting for confirmation from agent (only sales finance product).
- Name
ready-for-disbursement- Description
Event indicating application is ready to be disbursed.
- Name
issued- Description
Event indicating application has been issued (only credit card product).
- Name
disbursed- Description
Event indicating application has been disbursed.
Example approved event
{
"applicationId": "string",
"externalApplicationId": "string",
"agentId": "string",
"timestamp": "2024-10-24T17:21:35.531Z",
"payload": {
"product": "string",
"approvedAmount": 0,
"duration": 0,
// ...
}