Skip to main content

Overview

EasyCred offers two distinct integration modes. You select the mode per request when initiating a journey using the channel field. The rest of the journey flow depends on which mode you choose.

Comparison

FeatureHosted (API_HOSTED)Headless (API_HEADLESS)
ReturnshostedUrljourneySession
UI OwnershipEasyCred owns the screensYou build and own the UI
Steps Handled ByEasyCred (OTP, offers, KYC, e-sign, mandate)Your backend via REST
Integration EffortMinimalFull control
Best ForFastest time-to-marketCustom branded experience

Hosted Mode (API_HOSTED)

API_HOSTED

Start a journey and get back a hostedUrl. Redirect the customer to it or embed it in a WebView. EasyCred’s screens handle the entire loan journey through to completion.
How it works:
1

Initiate the Journey

Call POST /api/v1/partner/journey/initiate with channel: "API_HOSTED".
2

Redirect the Customer

Use the returned hostedUrl to open EasyCred’s hosted screens for your customer.
3

Track Progress

Poll GET /api/v1/partner/leads/{applicationId}/status or subscribe to webhooks for real-time updates.
In Hosted mode, GET /journey/{journeyId} (the headless state endpoint) requires a journeySession and cannot be used. Use the application-status endpoint or webhooks instead.

Headless Mode (API_HEADLESS)

API_HEADLESS

Your backend fully drives the loan journey over REST. You control every screen the customer sees, submitting their choices as actions and handling verification redirects.
How it works:
1

Initiate the Journey

Call POST /api/v1/partner/journey/initiate with channel: "API_HEADLESS". You receive a journeySession token.
2

Poll Journey State

Call GET /api/v1/partner/journey/{journeyId} with X-Journey-Session header to read the current nextAction.
3

Branch on Category

Act on the nextAction.categoryPOLL, COLLECT, REDIRECT, or TERMINAL.
4

Submit Actions

When the category is COLLECT, gather the customer’s choice and POST it to /journey/{journeyId}/action.
5

Handle Redirects

When the category is REDIRECT, open the verification URL for the customer, then signal return via /redirect-returned.
6

Read the Outcome

When TERMINAL, read data.outcome and stop polling.

Journey State Machine

The journey always exposes a single nextAction. Your code branches on its category:
Wait pollIntervalSeconds then read state again. Do not call the lender directly.
Gather the customer’s input, then submit a POST action to the journey.
Open currentNextAction.url for the customer (KYC / e-sign / mandate). Signal return when done.
Read outcome and stop polling. See Journey Outcomes.