Integration pattern: Bridge Widget | Products: VOIE, Income Insights | Demo: SmartRouting
Get started
Run the demo
Clone and run the SmartRouting demo to see the full smart routing flow working locally.Open
http://localhost:5173, select Consumer Credit > Smart Routing, and walk through a verification using sandbox credentials (goodlogin / goodpassword).See full setup instructions for ngrok and environment configuration.Understand the API flow
The demo follows this sequence:
- Search for employer — Your server calls GET /v1/company-mappings-search/ to find the applicant’s employer. The
success_ratefield in the response determines the recommendation:highsuggests payroll,low/mediumsuggests bank, and no results suggests documents. - Create a user — Your server calls POST /v1/users/ to create a Truv user.
- Create a bridge token — Your server calls POST /v1/users//tokens/ with the selected
data_sourcesarray (["payroll"],["financial_accounts"], or["docs"]). Passcompany_mapping_idfor payroll to deeplink Bridge to the employer. - Initialize Bridge — Your frontend opens Truv Bridge with the
bridge_token. The applicant connects their provider. - Receive webhooks — Truv sends a
task-status-updatedwebhook when verification completes. Verify the signature using theX-Webhook-Signheader with HMAC-SHA256. - Retrieve the report — For payroll or document methods, fetch the VOIE report with
POST /v1/users/{user_id}/reports/. For bank income, fetch the income insights report withPOST /v1/users/{user_id}/income_insights/reports/.
Review the code
Each step maps to a specific file in the demo. Use these as reference when building your integration.
| Step | Demo file | API reference |
|---|---|---|
| Employer search | src/components/CompanySearch.jsx | Company Search |
| User creation | server/routes/bridge.js | POST /v1/users/ |
| Bridge token | server/routes/bridge.js | POST /v1/users//tokens/ |
| Bridge initialization | src/demos/SmartRouting.jsx | Bridge SDK |
| Webhook verification | server/webhooks.js | Webhook events |
| Report retrieval | server/routes/user-reports.js | Income reports |
Consumer Credit-specific configuration
Routing logic
Thesuccess_rate field from company search drives the recommendation:
success_rate value | Recommended method | data_sources |
|---|---|---|
high | Payroll | ["payroll"] |
low / medium | Bank transactions | ["financial_accounts"] |
| No results | Document upload | ["docs"] |
Data sources
Control which verification methods Bridge shows by setting thedata_sources array when creating the bridge token:
company_mapping_id to deeplink Bridge to the employer. For bank income, pass provider_id to deeplink to the financial institution. Document upload requires no additional identifier.
Report types
The report endpoint depends on the method the applicant chose:| Method | Report endpoint | Report type |
|---|---|---|
| Payroll | POST /v1/users/{user_id}/reports/ | VOIE |
| Bank transactions | POST /v1/users/{user_id}/income_insights/reports/ | Income Insights |
| Documents | POST /v1/users/{user_id}/reports/ | VOIE |
Next steps
Bank Income
Verify income from bank transactions when payroll coverage is low
Payroll Income
Connect directly to payroll for the highest data quality
Bridge Widget Guide
Full implementation guide for user creation, bridge tokens, and Bridge initialization
Deeplinking
Skip the provider search screen when you already know the employer or bank