> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truv.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payroll Income

> Verify applicant income and employment directly from payroll providers

Verify income and employment by connecting directly to the applicant's payroll provider. This delivers the highest data quality -- verified pay history, employer details, and current employment status -- for lending decisions.

<Info>
  **Integration pattern:** [Bridge Widget](/developers/integration/bridge-widget/overview) | **Products:** VOIE | **Demo:** [Payroll Income](/developers/demos/consumer-credit/payroll-income)
</Info>

***

## Get started

<Steps>
  <Step title="Run the demo">
    Clone and run the [Payroll Income demo](/developers/demos/consumer-credit/payroll-income) to see the full payroll income verification flow working locally.

    ```bash theme={null}
    git clone https://github.com/truvhq/demo-apps.git
    cd demo-apps
    npm install && npm start
    ```

    Open `http://localhost:5173`, select **Consumer Credit > Payroll Income**, and walk through a verification using sandbox credentials (`goodlogin` / `goodpassword`).

    See [full setup instructions](/developers/quickstarts-overview#demo-apps) for ngrok and environment configuration.
  </Step>

  <Step title="Understand the API flow">
    The demo follows this sequence:

    1. **Search for employer** -- Your server calls [GET /v1/company-mappings-search/](/api-reference/companies/company_autocomplete_search) to find the applicant's employer by name. The response returns a `company_mapping_id`.
    2. **Create a user** -- Your server calls [POST /v1/users/](/api-reference/users/users_create) to create a Truv user.
    3. **Create a bridge token** -- Your server calls [POST /v1/users/{id}/tokens/](/api-reference/bridge-token/users_tokens) with `product_type: "income"`, `data_sources: ["payroll"]`, and `company_mapping_id` to [deeplink](/developers/integration/bridge-widget/deeplinking) Bridge to the employer.
    4. **Initialize Bridge** -- Your frontend opens [Truv Bridge](/developers/sdks/overview) with the `bridge_token`. The applicant connects their payroll account.
    5. **Receive webhooks** -- Truv sends a `task-status-updated` [webhook](/api-reference/webhooks) when verification completes. Verify the signature using the `X-Webhook-Sign` header with HMAC-SHA256.
    6. **Retrieve the VOIE report** -- Fetch the report with [POST /v1/users/{user_id}/reports/](/api-reference/user-income-and-employment-reports/users_reports). The report contains verified income and employment data from the payroll provider.
  </Step>

  <Step title="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`](https://github.com/truvhq/demo-apps/blob/main/src/components/CompanySearch.jsx) | [Company Search](/api-reference/companies/company_autocomplete_search)            |
    | User creation         | [`server/routes/bridge.js`](https://github.com/truvhq/demo-apps/blob/main/server/routes/bridge.js)                   | [POST /v1/users/](/api-reference/users/users_create)                              |
    | Bridge token          | [`server/routes/bridge.js`](https://github.com/truvhq/demo-apps/blob/main/server/routes/bridge.js)                   | [POST /v1/users/{id}/tokens/](/api-reference/bridge-token/users_tokens)           |
    | Bridge initialization | [`src/demos/PayrollIncome.jsx`](https://github.com/truvhq/demo-apps/blob/main/src/demos/PayrollIncome.jsx)           | [Bridge SDK](/developers/sdks/overview)                                           |
    | Webhook verification  | [`server/webhooks.js`](https://github.com/truvhq/demo-apps/blob/main/server/webhooks.js)                             | [Webhooks](/api-reference/webhooks)                                               |
    | Report retrieval      | [`server/routes/user-reports.js`](https://github.com/truvhq/demo-apps/blob/main/server/routes/user-reports.js)       | [Income reports](/api-reference/user-income-and-employment-reports/users_reports) |
  </Step>
</Steps>

***

## Consumer Credit-specific configuration

### Bridge token for payroll income

Set `data_sources` to `["payroll"]` to restrict Bridge to payroll connections only:

```json theme={null}
{
  "product_type": "income",
  "data_sources": ["payroll"],
  "company_mapping_id": "COMPANY_MAPPING_ID"
}
```

Pass `company_mapping_id` from the [company search](/api-reference/companies/company_autocomplete_search) to deeplink Bridge directly to the employer's payroll provider. Without it, Bridge shows a generic employer search screen.

<Note>
  Payroll income uses `company_mapping_id` (not `provider_id`). The `provider_id` field is for financial institutions like banks. Passing the wrong identifier type causes Bridge to show a generic search screen.
</Note>

### VOIE report

Payroll income verification returns a standard [VOIE report](/api-reference/user-income-and-employment-reports/users_reports) containing:

* Current and historical income (base pay, overtime, bonuses, commissions)
* Employment details (employer name, hire date, status)
* Pay frequency and YTD earnings

The `income` product type includes employment data automatically. You do not need to request `employment` separately.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Smart Routing" icon="route" href="/credit/integration/smart-routing">
    Automatically recommend payroll, bank, or documents based on employer coverage
  </Card>

  <Card title="Bank Income" icon="building-columns" href="/credit/integration/bank-income">
    Fall back to bank transactions when payroll coverage is low
  </Card>

  <Card title="Bridge Widget Guide" icon="book-open" href="/developers/integration/bridge-widget/overview">
    Full implementation guide for user creation, bridge tokens, and Bridge initialization
  </Card>

  <Card title="Deeplinking" icon="link" href="/developers/integration/bridge-widget/deeplinking">
    Skip the employer search when you already know the company
  </Card>
</CardGroup>
