> ## 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.

# Document Processing

> Collect and process documents for income and employment verification

Collect user documents, extract structured data, and analyze them for fraud with Truv's document processing. Common use cases include:

* **Fallback** for unsuccessful payroll connection attempts
* **Standalone solution** to collect and parse documents into structured data

<Tip>
  **Try the demo** -- The [Smart Routing demo](/credit/integration/smart-routing) includes document upload as a fallback verification method. [Clone the demo app ->](https://github.com/truvhq/demo-apps)
</Tip>

***

## Supported document types

* Paystubs
* W-2s
* 1099 tax forms (1099-DIV, 1099-G, 1099-INT, 1099-MISC, 1099-NEC, 1099-R, any year after 2021)

Files can be PDFs or phone photos. With [intelligent intake](/developers/integration/document-processing#intelligent-intake), Truv classifies each uploaded file, flags unreadable scans up front, and lets you finalize only the documents you need.

***

## Configure bridge token

When creating a [Truv Bridge](/developers/sdks/overview) [Token](/api-reference/bridge-token/users_tokens), include `product_type = income` and `data_sources = ["docs"]`:

```bash theme={null}
curl -X POST https://prod.truv.com/v1/users/{user_id}/tokens/ \
  -H "X-Access-Client-Id: YOUR_TRUV_CLIENT_ID" \
  -H "X-Access-Secret: YOUR_TRUV_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "product_type": "income",
    "data_sources": ["docs"],
    "tracking_info": "any data for tracking"
  }'
```

***

## Testing

### Successful Documents

Upload these PDFs for successful sandbox responses:

* [Most recent paystub](https://prod.truv.com/v1/permalink/most.recent.paystub.pdf)
* [Next recent paystub](https://prod.truv.com/v1/permalink/next.recent.paystub.pdf)
* [First paystub](https://prod.truv.com/v1/permalink/first.paystub.pdf)
* [W2](https://prod.truv.com/v1/permalink/w2.pdf)

### 1099 Tax Forms

* [1099-DIV](https://prod.truv.com/v1/permalink/1099div.pdf), [1099-G](https://prod.truv.com/v1/permalink/1099g.pdf), [1099-INT](https://prod.truv.com/v1/permalink/1099int.pdf), [1099-MISC](https://prod.truv.com/v1/permalink/1099misc.pdf), [1099-NEC](https://prod.truv.com/v1/permalink/1099nec.pdf), [1099-R](https://prod.truv.com/v1/permalink/1099r.pdf), [SSA-1099](https://prod.truv.com/v1/permalink/ssa1099.pdf)

<Info>
  Test scenarios use the file name to return results. Testing ignores file contents in sandbox.
</Info>

***

## Suspicious document detection

### Suspicious Flag (`is_suspicious`)

When processing documents, Truv may flag them as suspicious while still completing the task. The `is_suspicious` flag indicates potential document manipulation that warrants additional review.

#### When Documents Are Flagged

<AccordionGroup>
  <Accordion title="PDF Metadata Indicators" icon="file-pdf">
    Documents are flagged when PDF metadata indicates potential manipulation, including software like FoxitPDF, Adobe Scan, CamScanner, and other document editing applications.
  </Accordion>

  <Accordion title="Paystub Date Inconsistencies" icon="calendar">
    * **Too Early:** Pay date before the pay period start date
    * **Too Late:** Pay date 30+ days after the pay period end date
  </Accordion>

  <Accordion title="Browser-Generated PDFs" icon="globe">
    Documents created through browser "Print to Save as PDF" on non-PDF files are flagged because the original content may have been modified before conversion.
  </Accordion>
</AccordionGroup>

#### When Documents Are Failed

In cases of high-confidence fraud, the task fails entirely:

* **Known fraud templates**: Document matches a known fraudulent template
* **Obvious manipulation tools**: PDF metadata indicates use of tools like iLovePDF, Canva, etc.

<Warning>
  Documents flagged as `is_suspicious = true` are still processed and results are returned. Failed documents do not return results and require resubmission.
</Warning>

***

## API reference

<CardGroup cols={2}>
  <Card title="Document Collections" icon="upload" href="/api-reference/document-collections/collections_create">
    Upload and process documents via the Collections API
  </Card>

  <Card title="Document Collections" icon="folder" href="/api-reference/document-collections/object">
    Manage document collections
  </Card>

  <Card title="Parsed Documents" icon="file-magnifying-glass" href="/api-reference/parsed-documents/object">
    Retrieve parsed data
  </Card>

  <Card title="Bridge Token" icon="key" href="/api-reference/bridge-token/object">
    Create tokens for Truv Bridge
  </Card>
</CardGroup>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Tax Returns" icon="file-invoice" href="/credit/data-sources/tax-returns">
    Tax return verification
  </Card>

  <Card title="Implementation Guide" icon="code" href="/developers/integration/document-processing">
    Full Document Processing API walkthrough
  </Card>
</CardGroup>
