Web-Hooks
Web-Hooks
Aarthik Labs uses one shared web-hook system across borrower experiences.
Hosted Experience and Hybrid Experience use the same web-hook contract. Your back-end can build one receiver and handle events consistently across both Aarthik-powered credit journeys.
Web-hooks are back-end-to-back-end notifications. Use them as the durable signal for journey state, reconciliation, support workflows, notifications, analytics, and post-disbursal servicing.
Where This Applies
Your receiver does not need to be split by experience. Use origin_experience, current_experience_surface, tenant_id, application_id, and borrower.journey.type to route events inside your own systems.
Delivery Contract
Subscription APIs
Use the web-hook subscription APIs from your back-end to manage the callback URL for an application. Authenticate with the platform API key for the same tenant/application scope.
Read Configuration returns the currently active web-hook status and callback URL for the application.
Subscribe accepts an HTTPS url and enables delivery for journey.snapshot events.
Un-Subscribe does not require a request body. It disables delivery for the application, clears the callback URL, and disables the stored signing secret. After this call succeeds, Aarthik Labs stops sending web-hooks for that tenant/application until Subscribe is called again.
Delivery Headers
Payload Shape
The request body is the latest OutBound snapshot for the borrower journey. It includes experience metadata, tenant/application identifiers, borrower profile data, journey status, lender state, offer state, and repayment schedule data when available.
A shortened example:
The exact fields that are populated depend on the credit product, journey stage, lender mode, borrower progress, and whether the borrower has crossed from one experience surface to another.
Experience Fields
Lifecycle Statuses
The snapshot includes the latest public journey status. Do not assume every journey will emit every status; the path depends on product, lender, eligibility, redirect behavior, and post-disbursal actions.
Delivery Flow
Signature Verification
Every delivery includes X-AL-Webhook-Timestamp and X-AL-Webhook-Signature.
To verify the signature:
- Read the timestamp from
X-AL-Webhook-Timestamp. - Parse the
v1value fromX-AL-Webhook-Signature. - Canonicalize the parsed JSON body by sorting object keys recursively and removing
undefinedvalues. - Compute
HMAC-SHA256over<timestamp>.<canonical-json-body>using your shared web-hook secret. - Compare the computed digest with the
v1digest using a timing-safe comparison.
Reject the event if the signature is missing, invalid, or outside the timestamp tolerance you enforce.
Receiver Checklist
Your web-hook endpoint should:
- accept
POSTrequests over HTTPS - verify the Aarthik Labs signature before trusting the payload
- deduplicate using
X-AL-Event-ID - persist the snapshot against your borrower, lead, application, or loan record
- process events idempotently
- return
2xxonly after the event has been accepted for processing - keep long-running downstream work outside the request-response path
Polling And Web-Hooks
Frontend polling, bridge events, or browser callbacks can help your UI react while the borrower is actively on screen. Web-hooks are the back-end source of truth for events that may happen after the borrower closes the screen, completes an external lender step, returns later, or moves into post-disbursal servicing.
Operational Notes
- Web-hook configuration is application-scoped.
- The receiver URL must use HTTPS.
- Failed deliveries can be retried. Treat delivery as at-least-once, not exactly-once.
- Network failures, timeouts, rate limits, and temporary server errors should be handled idempotently by your receiver.
- Keep borrower notifications separate from delivery acknowledgement so a retry does not accidentally notify a borrower twice.
- Monitor delivery failures and reconciliation gaps so your internal state does not silently drift from the Aarthik Labs journey state.