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

# Document Processing

Uploading W-2s, 1099s, paystubs, proof of identity and address, and other documents through Link.

<Frame>
  <img src="https://mintcdn.com/argyle/zs6lb-w1jQV9DVbr/images/overview/how-argyle-works/5-how-argyle-works.png?fit=max&auto=format&n=zs6lb-w1jQV9DVbr&q=85&s=0adeffff94b9f94a99c58aa50540413b" alt="Link supports directly uploading documents such as paystubs, W-2s, and 1099s as well as proof of identity, proof of address, and a miscellaneous (re-namable) category of documents." width="2100" height="1350" data-path="images/overview/how-argyle-works/5-how-argyle-works.png" />
</Frame>

## Uploading documents

<div className="argyle-divider" />

### User uploads within Link

Document uploads can be enabled and customized through the <a href="https://console.argyle.com/flows" target="_blank">Flows</a> section of Console.

<Accordion title="How to enable document uploads on Link's intro screen">
  1. Create or edit an existing Flow.
  2. In the **Intro screen** section, enable the "Intro screen" and "Document upload" toggles.
  3. In the **Document upload settings** section:

  * Customize the text of the document upload submission screen.
  * Select the document upload categories you would like to display. Choose whether a selected category is optional or required. If required, specify how many documents are needed for the category.
</Accordion>

<Accordion title="How to enable document uploads as a fallback (employer not found or incorrect login credentials)">
  1. Create or edit an existing Flow.
  2. In the **Search and connect** section, scroll down to **Fallback experiences** and select the "Document upload" toggle for one or both fallback scenarios:

  * **User finds no search results** (*not applicable to [Direct login](/workflows/account-connections#direct-login) flows*): Users are prompted to upload documents when they are unable to locate their employer or payroll provider through Link search.
  * **User provides incorrect credentials**: Users are prompted to upload documents when a payroll connection attempt is unsuccessful.

  3. In the **Document upload settings** section:

  * Customize the text of the document upload submission screen.
  * Select the document upload categories you would like to display. Choose whether a selected category is optional or required. If required, specify how many documents are needed for the category.
</Accordion>

<Accordion title="How to disable payroll search and only allow document uploads">
  1. Create or edit an existing Flow.
  2. In the **Search and connect** section, select "Doc upload".
  3. In the **Document upload settings** section:

  * Customize the text of the document upload submission screen.
  * Select the document upload categories you would like to display. Choose whether a selected category is optional or required. If required, specify how many documents are needed for the category.

  When this account connection flow is enabled, Link users will be directly connected to the document upload screen, bypassing the payroll account connection process.

  <Frame>
    <img src="https://mintcdn.com/argyle/QYNgkspEsQEdzfi4/images/argyle-guides/workflows/document-upload/5-document-upload.png?fit=max&auto=format&n=QYNgkspEsQEdzfi4&q=85&s=d305b411502027a91db11ac069fc79f5" alt="Select Doc upload in the search and connect tab when creating a Link flow customization." width="4456" height="2871" data-path="images/argyle-guides/workflows/document-upload/5-document-upload.png" />
  </Frame>
</Accordion>

<Accordion title="How to enable document uploads on Link's success screen (after an account connection)">
  1. Create or edit an existing Flow.
  2. In the **Success screen** section, select "Allow users to upload documents after a successful connection".
  3. In the **Document upload settings** section:

  * Customize the text of the document upload submission screen.
  * Select the document upload categories you would like to display. Choose whether a selected category is optional or required. If required, specify how many documents are needed for the category.
</Accordion>

The following document uploaded categories are currently supported:

| Category          | Description                                                                                   | OCR supported | Authenticity supported |
| ----------------- | --------------------------------------------------------------------------------------------- | ------------- | ---------------------- |
| Paystubs          | Paystubs used as proof of income.                                                             | Yes           | Yes                    |
| W-2s              | Yearly wage, salary, and tax information.                                                     | Yes           | Yes                    |
| 1099s             | Income other than wages, salaries, and tips.                                                  | Yes           | No                     |
| Proof of identity | Valid form of identity such as a driver's license or passport.                                | No            | No                     |
| Proof of address  | Residential address verification, such as a utility bill, bank statement, or lease agreement. | No            | No                     |
| Miscellaneous     | Re-nameable category for miscellaneous documents.                                             | No            | No                     |

If all document categories are marked as *Optional*, the option to "Skip document upload" will be presented to users:

<Frame>
  <img src="https://mintcdn.com/argyle/QYNgkspEsQEdzfi4/images/argyle-guides/workflows/document-upload/7-document-upload.png?fit=max&auto=format&n=QYNgkspEsQEdzfi4&q=85&s=2e4268475ba3c20e00d4a0f14f65de47" alt="If all document upload categories are marked as optional, the option to skip document upload will be presented to users." width="1532" height="1115" data-path="images/argyle-guides/workflows/document-upload/7-document-upload.png" />
</Frame>

After enabling document uploads and saving your Flow in Console:

* **Shareable URLs** — Document uploads will be active when any user enters Link through your saved shareable URL.
* **Email/SMS Templates** — When [inviting new users](/console/flows/email-sms-templates#inviting-new-users), select the Flow from the **Template** dropdown.
* **Embedded Experiences** — Copy the Flow ID from Console and add the following line to your [Link initialization](/link/initialization/overview#optional-initialization-parameters):
  ```json theme={}
  flowId: "<Flow ID>" // (e.g. "V32M5YBC")
  ```

### Additional uploads (returning users)

When document uploads are enabled, users can [return to Link](/workflows/reconnecting-accounts#returning-users-to-link) and upload additional documents or delete previously uploaded documents. Any category limits (i.e. 3 max paystubs) you set when [enabling document uploads](/workflows/document-processing#enabling-document-uploads) will persist for returning users.

<Frame>
  <img src="https://mintcdn.com/argyle/QYNgkspEsQEdzfi4/images/argyle-guides/workflows/document-upload/6-document-upload.png?fit=max&auto=format&n=QYNgkspEsQEdzfi4&q=85&s=597277ab54c1f461ba7bafa45fc07e5f" alt="Users can return to Link if you need them to upload additional documents." width="1731" height="1112" data-path="images/argyle-guides/workflows/document-upload/6-document-upload.png" />
</Frame>

### Direct uploads via the API

If you already collect documents outside of Link, they can be uploaded [directly via the API](/api-reference/user-uploads#upload) by sending a `POST` request to the `/user-uploads` endpoint.

<Note>
  Uploading documents via the API can be used in combination with [document authenticity and OCR](/workflows/document-processing#document-authenticity-and-ocr). OCR and authenticity information can also be retrieved via the API — see our [OCR guide](/integrations/ocr/ocrolus#api) for more information.
</Note>

## Retrieving uploaded documents

Uploaded documents can be retrieved via Argyle's API through the [`/user-uploads`](/api-reference/user-uploads) endpoint. Argyle also provides [webhooks](/api-reference/user-uploads-webhooks/added) for uploaded documents and the [`onDocumentsSubmitted`](/link/reference/callbacks#ondocumentssubmitted) callback.

Uploaded documents can also be retrieved within the <a href="https://console.argyle.com/connections" target="_blank">Connections section of Console</a> after selecting an individual user. Any uploaded documents will be available for download in an **Uploaded documents** tab.

<Frame>
  <img src="https://mintcdn.com/argyle/X2Ud-Ls5bpXC3Xsk/images/argyle-guides/integrations/document-ocr-processors/2-OCR.png?fit=max&auto=format&n=X2Ud-Ls5bpXC3Xsk&q=85&s=15a597c09e758e006539b57076d826f8" alt="If a user has uploaded documents through Link, they will appear in an Uploaded Documents tab on the user's page in Console." width="8136" height="5248" data-path="images/argyle-guides/integrations/document-ocr-processors/2-OCR.png" />
</Frame>

## Document authenticity and OCR

Argyle offers uploaded document processing through [Ocrolus](/integrations/ocr/ocrolus). The text within uploaded documents is scanned (OCR), and the authenticity of the document is evaluated. The results are made available to [view directly in Console](/integrations/ocr/ocrolus#console) or [retrieve via Argyle's API](/integrations/ocr/ocrolus#api).

<Frame>
  <img src="https://mintcdn.com/argyle/X2Ud-Ls5bpXC3Xsk/images/argyle-guides/integrations/document-ocr-processors/3-OCR.png?fit=max&auto=format&n=X2Ud-Ls5bpXC3Xsk&q=85&s=46a236fa361202ed5b0c193b1e16c898" alt="Summary information of document authenticity returned by Ocrolus can be viewed in Console." width="1492" height="1619" data-path="images/argyle-guides/integrations/document-ocr-processors/3-OCR.png" />
</Frame>

## Supported file types

| File format        | Link support                             | Ocrolus OCR support |
| ------------------ | ---------------------------------------- | ------------------- |
| PDF                | Web, iOS, Android, React Native, Flutter | Yes                 |
| JPG image uploads  | Web, iOS, Android, React Native, Flutter | Yes                 |
| PNG image uploads  | Web, iOS, Android, React Native, Flutter | Yes                 |
| HEIC image uploads | Web, iOS, Android, React Native, Flutter | Yes                 |
| Photo capture      | Web, iOS, Android, React Native, Flutter | Yes                 |

## Restricting to only PDFs

Document uploads can be restricted to only PDF file types by enabling the **Restrict to PDF only** toggle for each document type in the <a href="https://console.argyle.com/flows" target="_blank">Flows</a> section of Console.

<Frame>
  <img src="https://mintcdn.com/argyle/uzAEgPS2J3g8X799/images/argyle-guides/workflows/document-upload/8-document-upload.png?fit=max&auto=format&n=uzAEgPS2J3g8X799&q=85&s=33979d80efc102561bd448e4132218c8" alt="Toggle Restrict to PDF only to restrict file uploads to PDFs only." width="1530" height="1111" data-path="images/argyle-guides/workflows/document-upload/8-document-upload.png" />
</Frame>

When a document type is restricted to PDF only, Link will adjust accordingly to guide users. Depending on the device used to upload documents, they will either be prevented from selecting non-PDF file types or shown an error if a non-PDF file type is uploaded.

<Frame>
  <img src="https://mintcdn.com/argyle/uzAEgPS2J3g8X799/images/argyle-guides/workflows/document-upload/9-document-upload.png?fit=max&auto=format&n=uzAEgPS2J3g8X799&q=85&s=1913bee6645413071572ac48b18c36c2" alt="Link's doc upload button will change to say Upload PDF instead of Upload, and an invalid file format error will be shown if the user attempts to upload a non-pdf file type." width="1647" height="1100" data-path="images/argyle-guides/workflows/document-upload/9-document-upload.png" />
</Frame>
