Integrations Guide

Hybrid Experience is a back-end-led integration. Your front-end talks to your back-end. Your back-end talks to Aarthik Labs with a server-side API key.

The production flow uses three back-end calls:

  1. Start or resume the borrower journey.
  2. Poll lender-grouped offers and Account Aggregator readiness.
  3. Request a Hosted Experience URL after the borrower selects an offer.

Environment Setup

Set these on the back-end that calls Aarthik Labs. Do not expose the API key to browsers or mobile apps.

$PLATFORM_BASE_URL="https://preprod.credit.aarthiklabs.com"
$PLATFORM_API_KEY="sk_test_xxx"

For production, use the production base URL and live API key provided for your application.

1. Start Or Resume Journey

Your back-end creates or resumes the borrower’s Hybrid journey.

POST /api/v1/hybrid/personal-loan/borrowers/{borrowerProviderID}/journey

Use a stable borrowerProviderID for the same borrower across sessions. This lets the platform resume the right borrower journey instead of creating duplicate borrower records.

Send borrower profile, work, address, banking, and journey information according to the API Reference. The platform stores the pre-fill data and starts the offer-fetch pipeline.

After this call succeeds, your product should show an active wait state and start polling offers from your back-end.

2. Poll Offers And Account Aggregator Readiness

Your back-end reads the current offer state while the borrower stays in your UI.

GET /api/v1/hybrid/personal-loan/borrowers/{borrowerProviderID}/journey/offers

This response can contain:

  • current journey status
  • lender-grouped offer state
  • selectable offers with OFFER_RECEIVED
  • lenders waiting for Account Aggregator consent
  • an Account Aggregator URL when consent is ready
  • a recommended poll_after_ms

Your app should keep polling until one of these outcomes is available:

OutcomeWhat your app should do
Offers are availableShow lender-grouped offers and let the borrower choose one.
Account Aggregator is readyShow an AA consent action and open the returned URL when the borrower continues.
Account Aggregator is processingKeep the borrower in a waiting state and poll again after poll_after_ms.
No offers are availableShow a clear no-offer state.

3. Request Hosted URL

After the borrower selects an offer in your UI, your back-end requests a Hosted Experience URL for that selected offer.

GET /api/v1/hybrid/personal-loan/borrowers/{borrowerProviderID}/journey/offers/{offerID}/hosted

The returned hosted_url is short-lived and should be opened immediately in the borrower browser, webview, or app shell.

Hosted Experience then takes over the selected-offer journey, including KFS, KYC, mandates, agreements, lender redirects, and post-disbursal servicing.

End-To-End Flow

Implementation Notes

  • Keep PLATFORM_API_KEY server-side.
  • Use your own back-end endpoint as the front-end boundary.
  • Treat borrowerProviderID as stable application-owned identity.
  • Do not reuse expired Account Aggregator or Hosted URLs.
  • Follow poll_after_ms to avoid unnecessary polling load.
  • Store journey and offer identifiers in your back-end if your product needs support, analytics, or CRM reconciliation.

Mobile Applications

If your Hybrid journey runs inside a mobile app, treat the Hosted handoff as a hosted mobile integration.

Your app should be ready to:

  • open Account Aggregator and Hosted URLs in an approved browser or app-controlled surface
  • keep the Aarthik Labs API key on your back-end
  • register the mobile bridge before loading Hosted screens
  • support lender-owned external steps and return behavior
  • provide camera, file, location, and related permissions when a journey step requires them
  • handle Hosted exit events cleanly

Read the mobile application pages under this Integrations Guide for the bridge and permission requirements: