Integration pattern: Bridge Widget (User + Bridge Token flow) | Products: DDS | Demo: Direct Deposit Switch
Get started
1
Run the demo
Clone and run the Direct Deposit Switch demo to see the full direct deposit switch flow working locally.Open
http://localhost:5173, select Retail Banking > Deposit Switch, and walk through a switch using sandbox credentials (goodlogin / goodpassword).See full setup instructions for ngrok and environment configuration.2
Understand the API flow
The demo follows this sequence:
- 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
product_type: "deposit_switch"and anaccountobject containing your bank’s account details and allocation preferences. - Initialize Bridge — Your frontend opens Truv Bridge with the
bridge_token. The customer connects their payroll provider and confirms the deposit switch. - Receive webhooks — Truv sends a
task-status-updatedwebhook with statusdonewhen the switch completes. Verify the signature using theX-Webhook-Signheader with HMAC-SHA256. - Retrieve the report — Fetch the deposit switch confirmation with GET /v1/users//deposit_switch/report/.
3
Review the code
Each step maps to a specific file in the demo. Use these as reference when building your integration.
Configure account details
Pass your bank’s account details in theaccount object when creating the bridge token. These fields tell Truv where to route the customer’s paycheck.
Set allocation type
Control how much of the customer’s paycheck routes to your bank. Choose one of three allocation types.Full paycheck
Fixed amount
Percentage
Next steps
Bridge Widget Guide
Full implementation guide for the User + Bridge Token flow
Sandbox Testing
Test deposit switching in sandbox
Webhooks
Handle task-status-updated and other webhook events
DDS Report API
Retrieve deposit switch confirmation reports