LoanPro Webhooks¶
LoanPro allows you to set up event-based or trigger-based system notifications to be sent out when specific criteria is met or an event occurs on a customer's account. These can be sent over different channels like email, Interactive SMS, Smart Mail House and webhook. At the moment Majority use only webhooks so this document is focusing on how the webhooks are set up and handled.
Webhook setup¶
Here you can find the guide that descibes in general how to set up a webhook in LoanPro Management UI. This chapter focuses on the specifics that you need to focus when you set up a webhook.
Callback URLs¶
Stage - https://stage-credit.minority.com/v1/webhooks/events
Production - https://credit.minority.com/v1/webhooks/events
Headers¶
| Header | Value |
|---|---|
| Content-Type: | application/json |
| Authorization: | LoanProWebhook token-can-be-found-in-azure-kv |
Note: Here you can find the implementation detatils of the webhook authorization.
Event Context:¶
Here you can find the glossary of the variables can be included in the context of the webhook event.
Note: Most of the cases the variables called arrays are actually dictionaries and serialized like dictionaries except if they are empty. Then they're serialized as array. If you expect to get empty in the context use EmptyArrayDictionaryConverter on the context model.
Webhook handling¶
The LoanPro webhook handling system processes various loan-related events through a context-based handler architecture. Events are routed to specialized handlers that execute business logic for each event type.
Architecture¶
Handler Pattern¶
The system uses a context handler pattern with a base class implementation:
ContextHandlerBase- Provides common webhook processing logic- Specialized Handlers - Inherit from base and implement event-specific logic:
LoanProWebhookEventHandler- Main orchestrator that routes events to appropriate handlers
New event types can be added by creating new context handlers.
Processing Flow¶
Webhook Received => LoanProWebhookEventHandler => Route to Appropriate Context Handler => Execute Event-Specific Logic => Update System State