Truework Credentials allows an employee to log into their payroll platform and share their income/employment data directly with Truework. Truework.js allows you to embed this employee-driven verification workflow directly in your user-facing application. If the employee doesn't remember their payroll password, you have the option to still verify any employee in the U.S. with a fallback that leverages Truework Smart Outreach.
This page will show you how to get up and running with Truework.js and Truework Credentials in under 10 minutes. With our server and client-side libraries, you can verify any employee.
To make requests to the Truework API, you will need to create an API key for the Truework sandbox environment. It is also recommended that you configure a webhook to get notified when your verification requests have been completed, although doing so is not required for this tutorial.
- Include the Truework.js script on the page where you want to display the Credentials flow.
- On your backend, call the Truework API to initialize a Credentials session. The most minimal request looks like the following:
- Use the returned token to instantiate the Credentials flow.
The Truework widget will activate, and the user will be guided through the process. Behind the scenes, a new verification request will be created once the user fills out the necessary information. You'll receive a webhook notification once the request is completed. The webhooks and data use the same format as other Truework products. For guidance on how to set one up, see Configuring a Webhook.
A number of additional options are available to streamline the user experience.
Employee information can be preloaded, reducing the number of questions we’ll need to ask the user. If you have certain information about a user already, we recommend you preload it to remove the need for us to ask for certain fields within the widget experience.
Employer information can be preloaded as well. Preloading the employer information will allow Truework to bypass asking the employee to search for their employer or payroll system and directly take them to the payroll login screen for their employer.
Callbacks can be configured so that your frontend application can learn about events occurring inside the Credentials flow.
Tracking data can be attached to the request so that your system can associate the verification with the user.
If the employee doesn't remember their payroll credentials or is unable to login to their payroll account, Truework.js can be configured to kickstart a verification automatically via Smart Outreach. For more information on Smart Outreach please read Truework Instant and Smart Outreach using the Truework API.
The setting to toggle the fallback method on or off can be set when your production access is granted.
To see more detailed references regarding the requests and responses of various the API endpoints, see the API Docs.
To learn more about different ways that Truework's products can be used together to create complete verification workflows, check out our Implementation Guides.