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.
Hybrid product flows use the same three-call pattern. The product is selected by the URL path:
Business Hybrid is one composite public application. Start returns a BUSINESS_LOAN public root ID, while Offers can contain both BUSINESS_LOAN and self-employed PERSONAL_LOAN rows. Use each row’s productType to label the product. Never expect or persist a companion journey ID: pass the public root ID as journeyID on both continuation calls.
The production flow uses three back-end calls:
- Start a new application attempt for the borrower.
- Poll lender-grouped offers for that journey and Account Aggregator readiness when the selected source supports it.
- Request a Hosted Experience URL for that journey 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.
For production, use the production base URL and live API key provided for your application.
1. Start Journey
Your back-end starts the borrower’s Hybrid journey.
Use a stable borrowerProviderID for the same borrower across sessions and application attempts. This keeps borrower history, resume, and post-disbursal tracking tied to one borrower record.
Prefer sending an Idempotency-Key header on Start:
- Use a fresh
Idempotency-Keyfor each new application attempt. - Reuse the same
Idempotency-Keyonly when retrying the same Start request after a timeout or temporary failure. - If you omit
Idempotency-Key, the platform treats the call as a new non-idempotent application attempt by generating an internal attempt key. This preserves fresh-journey creation for compatibility, but client retries can create duplicates. - Do not rotate
borrowerProviderIDto create a new application attempt.
Send borrower profile, work, address, and journey information according to the API Reference. Personal Loan can also accept banking information and optional buyer-supplied bureau data. Loan Against Mutual Funds follows the Personal Loan-style shape and can additionally accept optional free-form mfc data. Business Loan follows the Personal Loan-style shape and adds business-specific first-form fields in businessLoan. Gold Loan does not accept bureau, banking information, or loanPreferences in this start call. For Gold Loan, send pledged-gold fields as top-level goldInformation and use journey.consent.
In the API Reference, Loan Against Mutual Funds examples are split into Credit Line and Term Loan tabs. Both tabs use the same /loan-against-mutual-funds endpoints; the start call only changes the optional loanPreferences.facilitytype preference, while the offer and handoff responses show the facility-specific fields.
The example below shows the Gold Loan shape. Use the API Reference for the product-specific Personal Loan, Loan Against Mutual Funds, and Business Loan examples.
The platform stores the pre-fill data and starts the offer-fetch pipeline.
After this call succeeds, store data.journey.id. Your product should show an active wait state and start polling offers from your back-end with that journey ID.
2. Poll Offers And Account Aggregator Readiness
Your back-end reads the current offer state while the borrower stays in your UI.
Pass the data.journey.id value returned by Start as journeyID. The alias journey_id is also accepted. If you omit the journey ID, the borrower-only fallback is legacy behavior and may return a 409 ambiguity error when the same borrower has more than one active Hybrid application attempt.
This response can contain:
- current journey status
- a
pollingobject with the next legal poll time - lender-grouped offer state
- selectable offers with
OFFER_RECEIVED processingFee,applicationFee, andofferValidityon Personal Loan, Gold Loan, and Business Loan offer rows when available- optional
offerSignalson offer rows, when configured for that lender - branch locations for Gold Loan lenders, when returned by the lender
- lenders waiting for Account Aggregator consent, when applicable
- an Account Aggregator URL when consent is ready, when applicable
Gold Loan Hybrid does not include Account Aggregator right now. Gold Loan offer polling uses the same data.polling.shouldPoll, data.polling.lastPoll, and data.polling.nextPoll cadence, but the response omits data.account_aggregator and can include branches inside each lender group.
Business Loan uses the Personal Loan-style lender-grouped offer shape. Loan Against Mutual Funds uses a LAMF-specific lender-grouped shape: lender groups do not expose minimumLoanAmount or maximumLoanAmount, and each selectable offer is either a Credit Line or a Term Loan.
LAMF offers do not expose ltvRatio. LAMF Credit Line and Term Loan offer signals are documented as FINAL_OFFER, FULLY_DIGITAL_STP, and VERY_HIGH.
Your app should keep polling until one of these outcomes is available:
The offers endpoint enforces a server-owned polling cadence. Calls before data.polling.nextPoll can return 429 with the same polling object and Retry-After / X-Aarthik-Next-Poll-At headers. Treat that as a normal timing response and retry at the returned time.
Read Offer Polling & Rate Limits for the full cadence, Account Aggregator timing, and rate-limit behavior.
Offer Signals
Offer rows can include an optional offerSignals object:
Use these values as display hints for the borrower. They do not change offer ordering, eligibility, lender availability, or the Hosted handoff contract.
3. Request Hosted URL
After the borrower selects an offer in your UI, your back-end requests the URL that continues that offer. For Personal Loans, the third API can also record acceptance already captured in your application.
isOfferAccepted is optional and accepts only the exact lowercase values true and false:
Send true only after your application has shown the offer and required KFS information and captured the borrower’s explicit decision. A true request always returns data.offer_acceptance. Check data.offer_acceptance.applied rather than assuming the request accepted the offer:
- When
appliedistrue, the API has accepted the selected offer and may prepare the next lender step before issuing a URL. - When
appliedisfalse, open the returnedhosted_url; the borrower completes the standard offer and KFS review in Hosted Experience.
The true call is idempotent for the same selected offer, so it is safe to retry and poll. A different offer after the selection is locked returns HTTP 409 and no Hosted URL.
When data.offer_acceptance.applied is true, inspect data.redirection and data.polling:
READY: open the fresh signed Aarthikhosted_urlimmediately. The API never exposes the raw lender URL.PENDING: no URL is issued. Poll again atnextPoll, initially five seconds afterlastPoll.TERMINAL, orredirection: null: no borrower action remains;shouldPollis false.- Multiple-redirection journeys always use the first incomplete stage in this order: KYC, bank mandate when applicable, e-mandate, then loan agreement.
For Personal Loan responses where acceptance was applied, opening a READY hosted_url automatically forwards the borrower to the lender’s current step. A single-redirection journey goes to the lender destination. A multiple-redirection journey goes to the current external stage, such as KYC, e-mandate, or loan agreement/e-sign. The borrower does not need to click Verify or interact with an Aarthik Labs screen. A brief blank loading page may appear while the short-lived URL is validated.
Bank mandate remains Hosted when it is an Aarthik-owned or local borrower action. Omitted or false acceptance calls also retain the existing Hosted UI behavior. If direct handoff validation fails, the browser receives a minimal non-sensitive error instead of falling back to the journey tracker; request a fresh hosted_url after correcting or refreshing the stage.
Business Hybrid accepts either the public Business offer or a hidden Personal companion offer on its real source journey, while journey.id and target_journey_id remain the public Business root. Supported LAMF opt-in acceptance is limited to online single-redirection journeys; unsupported LAMF modes return HYBRID_HOSTED_STAGE_UNSUPPORTED. Gold Loan behavior is unchanged: its existing branch-confirmation contract is not governed by the new omitted/false semantics.
Every 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 tracking, KFS, KYC, mandates, agreements, lender redirects, post-disbursal actions, and servicing.
End-To-End Flow
Implementation Notes
- Keep
PLATFORM_API_KEYserver-side. - Use your own back-end endpoint as the front-end boundary.
- Treat
borrowerProviderIDas stable application-owned borrower identity. - Use a fresh
Idempotency-Keyfor each new Start attempt; reuse the same key only to retry that exact Start request. - Omitting
Idempotency-Keyis allowed for compatibility and creates a fresh non-idempotent attempt with a server-generated internal key. Add a client-supplied key when you need safe retries. - Do not reuse expired Account Aggregator or Hosted URLs.
- Follow
data.polling.nextPollto avoid unnecessary polling load and429responses. - Store
data.journey.idfrom Start and pass it asjourneyIDon Offers and Hosted calls. Storedata.journeyIDfrom Offers anddata.journey.idfrom Hosted responses for reconciliation; these values matchdata.journey.idin lifecycle web-hooks. - Store offer identifiers when your product needs offer-level support, analytics, or CRM reconciliation.
- For Gold Loan, read branch locations from the offers polling response, let the borrower select a branch, and pass that branch ID in the Hosted handoff path. The Hosted handoff response returns the selected lender, selected offer, relationship manager from fulfillment-agent data, and fresh Hosted URL.
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 Applications docs for the bridge and permission requirements: