Front-End Integrations
Front-End Integrations
The front-end integration is intentionally small. Your front-end never calls Aarthik Labs directly. It calls your back-end, receives an embedURL, and opens that URL for the borrower.
Recommended Web Flow
- Borrower taps a product entry point in your app.
- Your front-end calls your back-end endpoint.
- Your back-end returns
embedURL. - Your front-end renders the Hosted Experience.
- If the URL expires or the borrower returns later, your front-end asks your back-end for a fresh URL.
Examples
- NextJS Examples shows a client component that requests an
embedURLfrom your back-end and opens the Hosted Experience in aniframe.
iframe Requirements
For web embeds, use:
Also make sure:
- your domain is allowlisted for the application
- your host app runs over HTTPS in production
- your page layout gives the
iframeenough height for borrower forms and lender screens - your own Content Security Policy allows the Hosted Experience URL as a frame source
Mobile Applications
If your product opens Hosted Experience in a mobile webview or app shell, follow the same principle:
- request
embedURLfrom your back-end - open it immediately
- register the mobile bridge before loading Hosted
- handle external lender-step events from Hosted
- allow camera and file permissions when the journey needs them
- create a fresh URL when the borrower returns later
For mobile implementations, also read:
Loading And Retry States
Show a loading state while your back-end creates the URL. If URL creation fails, show a retry action that calls your back-end again.
Do not retry by reusing an old embedURL. The URL contains a short-lived bootstrap token and should be treated as a one-time browser entry point.