Overview
Credzu sends webhook callbacks (HTTP POST requests) to your registered endpoint whenever a significant event occurs for a lead. This allows your system to stay synchronized with borrower progress without polling.How Webhooks Work
- When you onboard as a partner, you provide Credzu with your webhook URL
- When events occur for your leads, Credzu sends a POST request to your URL
- Your server processes the event and returns a
200 OKresponse - If delivery fails, Credzu retries with exponential backoff
Webhook Payload Structure
All webhook payloads follow this structure:| Field | Type | Description |
|---|---|---|
event | string | The event type (e.g., contract_signed, mortgage_ready) |
timestamp | string | ISO 8601 timestamp when the event occurred |
lead_id | integer | Credzu’s unique identifier for the lead |
partner_lead_id | string | Your internal ID (if provided when creating the lead) |
details | object | Event-specific data (varies by event type) |
Available Events
| Event | Description | Priority |
|---|---|---|
lead_received | Lead was successfully created | Low |
client_account_created | Borrower completed onboarding | Medium |
credit_scan_completed | Borrower completed credit scan | Medium |
client_engaged_in_chat | Borrower sent messages | Low |
contract_signed | Borrower signed service contract | High |
escrow_funded | Borrower funded escrow account | High |
score_update | Credit score update (every 45 days) | High |
mortgage_ready | Borrower is ready to return | Critical |
Implementing Your Webhook Endpoint
Your endpoint must:- Accept
POSTrequests withContent-Type: application/json - Return
200 OKto acknowledge receipt - Process events asynchronously if needed (respond quickly, process later)
Example Implementation (PHP)
Retry Logic
If your endpoint fails to respond with200 OK:
| Attempt | Delay | Action |
|---|---|---|
| 1 | Immediate | First attempt |
| 2 | 5 seconds | Retry |
| 3 | 20 seconds | Retry |
| 4 | 60 seconds | Final retry |
- The webhook is marked as
failed - Credzu support is notified
- You can retrieve missed events using Get Events
Security Considerations
1
Use HTTPS
Your webhook URL must use HTTPS for secure data transmission.
2
Validate the payload
Check that required fields (
event, lead_id) are present before processing.3
Verify the lead belongs to you
Cross-reference the
partner_lead_id with your records.4
Process asynchronously
Return
200 OK immediately, then process the event in the background.Testing Webhooks
In the sandbox environment, you can:- Trigger simulated events for your test leads
- Verify your webhook endpoint is receiving and processing events correctly
- Test retry logic by temporarily returning error responses
Contact Credzu support to configure your webhook URL or update it for a new integration.