Quickstart

This quickstart shows the smallest production-shaped Hosted Experience integration:

  • keep the Aarthik Labs API key on your back-end
  • create an embedURL for a borrower
  • return only embedURL to your front-end
  • open the URL in an approved surface

Prerequisites

Before you start, make sure you have:

  • a platform base URL from Aarthik Labs
  • a platform API key for the tenant or application
  • at least one enabled credit product for the API key scope
  • an approved front-end domain if you plan to render the journey inside an iframe

Use environment variables on your back-end:

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

Step 1: Read Available Credit Products

Use this call when your app needs to decide which product entry points to show.

$curl --request GET "${PLATFORM_BASE_URL}/api/lab/features" \
> --header "Authorization: Bearer ${PLATFORM_API_KEY}"

Example response:

1{
2 "tenantID": "tenant_123",
3 "applicationID": "app_123",
4 "personalLoanEnabled": true,
5 "businessLoanEnabled": false,
6 "goldLoanEnabled": true
7}

If personalLoanEnabled is true, you can create a Personal Loan Hosted Experience URL. If goldLoanEnabled is true, you can create a Gold Loan Hosted Experience URL.

Step 2: Create An Embeddable URL

Create the URL from your back-end. Send a stable borrowerProviderID, an explicit journeyType, and the borrower’s contact number.

$curl --request POST "${PLATFORM_BASE_URL}/api/lab/sessions" \
> --header "Authorization: Bearer ${PLATFORM_API_KEY}" \
> --header "Content-Type: application/json" \
> --data-raw '{
> "borrowerProviderID": "BORROWER-123",
> "journeyType": "PERSONAL_LOAN",
> "profile": {
> "contactNumber": "9876543210"
> }
> }'

Example response:

1{
2 "embedURL": "https://credit.aarthiklabs.com/lab/embed?tenant_id=tenant_123&application_id=app_123&borrower_provider_id=BORROWER-123&journey_type=PERSONAL_LOAN#bt_live_personal_minimal"
3}

To print only the URL in a terminal:

$curl --silent --request POST "${PLATFORM_BASE_URL}/api/lab/sessions" \
> --header "Authorization: Bearer ${PLATFORM_API_KEY}" \
> --header "Content-Type: application/json" \
> --data-raw '{
> "borrowerProviderID": "BORROWER-123",
> "journeyType": "PERSONAL_LOAN",
> "profile": {
> "contactNumber": "9876543210"
> }
> }' | jq -r '.embedURL'

Step 3: Open The URL

Return only embedURL from your back-end to your front-end. Then open it in the borrower-facing surface.

For a web iframe:

1<iframe
2 src={embedURL}
3 title="Credit Journey"
4 allow="camera; microphone; clipboard-read; clipboard-write"
5 style={{ width: "100%", height: "80vh", border: 0 }}
6/>

The URL contains a short-lived bootstrap token in the URL fragment. Open it immediately after creating it. If a borrower returns later, call your back-end again and create a fresh URL for the same borrowerProviderID.

What To Build Next

After the first URL works, build these pieces around it:

  • a back-end route that validates your app user before calling Aarthik Labs
  • a product picker that uses GET /api/lab/features
  • a front-end loading and retry state
  • minimal and extended pre-fill payloads for Personal Loan and Gold Loan
  • production checks for domain allowlisting, API key rotation, and borrower identity stability