Integration pattern: Bridge Widget | Products: VOIE, Income Insights | Demo: Smart Routing
Get started
1
Run the demo
Clone and run the Smart Routing 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.2
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/.
3
Review the code
Each step maps to a specific file in the demo. Use these as reference when building your integration.
Consumer Credit-specific configuration
Routing logic
Thesuccess_rate field from company search drives the recommendation:
The applicant can always override the recommendation and pick any method.
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: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