Mortgage and lending document extraction
docRefinery extracts income, asset and loan data from borrower packets: pay stubs, bank statements, W-2s, verifications of employment and closing documents. A packet uploaded as one long PDF is separated into the documents inside it. Extracted fields come back with a confidence score and their place on the page, so a processor can check it rather than retype it.
Updated
The packet problem
Borrowers do not send documents one at a time. They scan two months of statements, three pay stubs and last year's W-2 into one file and upload it. docRefinery's segmentation separates a long file into the documents it contains and recognises each for what it is. A processor who disagrees with a document's type corrects it in the classification review queue, and the correction is kept on the run. The rest of the packet goes on to field extraction. Long files are the normal case here, not an exception: a thick packet goes in the same way as a single payslip.
What underwriting needs from each document in the file
| Document | Fields teams need |
|---|---|
| Pay stub (payslip) | Employer, employee, pay period, pay date, gross pay, net pay, year-to-date gross, deductions |
| Bank statement | Bank, account holder, account number as printed, statement period, opening and closing balance, a transactions table of dates, descriptions and amounts |
| Form W-2 | Employer and employer ID, employee, tax year, wages, federal income tax withheld |
| Verification of employment | Employer, employee, start date, position, base pay, pay frequency |
| Closing Disclosure | Loan amount, interest rate, monthly principal and interest, closing costs, cash to close, closing date |
Payslips and bank statements are in the 20-type catalogue; the bank statement page covers its fields and transaction tables in depth. W-2s, verifications of employment and Closing Disclosures are set up as a workflow or a custom type, trained at no charge.
The applicant changes, the payroll template does not
The applicant changes; the layout does not. Most pay stubs come from a small number of payroll providers, and each prints the same template for every employer it serves. A bank's statement looks the same every month for every customer. Some documents are fixed by regulation: employers report wages to the IRS on Form W-2, and the Closing Disclosure follows the content and model form (H-25) set out in Regulation Z. So a lender sees the same few hundred layouts across thousands of borrowers. Each is learned once and remembered after that.
Bank statements and transaction tables
Asset verification depends on tables, not single fields. docRefinery returns a statement's transactions as rows, across every page of the statement, and the Excel export puts each table on its own sheet. Your underwriters can then work out average balances, large deposits or recurring income in their own model. docRefinery does not calculate qualifying income or make credit decisions. It hands over the numbers as printed, with citations.
What a loan file gets beyond the split
| What a processor needs | What docRefinery gives |
|---|---|
| One parser for the packet | Pay stubs, statements and W-2s return the same format, with the same value, alias, confidence and location keys, so your code never branches by document. |
| Loan system field names | A Return as alias sets the output key, such as ytd_gross or closing_balance, to match your loan file. |
| Forms outside the catalogue | Custom types for W-2s, verifications and Closing Disclosures are trained, hosted and re-trained at no charge. |
| A new form live quickly | A workflow starts from one sample document, and versions, replay and compare show its effect before it goes live. |
| Proof for the underwriter | Extracted values and table cells carry page and box citations, so a figure can be traced in one look. |
| Fewer repeat fixes | A processor's correction becomes a suggested fix, tested on that layout's own documents before anyone applies it. |
| A limit on what is pulled | The organisation decides which fields may be extracted, with owner, admin and member roles. |
| A limit on how long it is kept | Retention runs from 7 days on Starter to custom terms on Enterprise, and data is encrypted in transit and at rest. |
Underwriting stays with your processors
Underwriting stays with people. You set confidence thresholds per field, so gross pay and closing balance can demand more than an address line. Anything below its threshold waits in the extraction review queue, with the source page beside it and the value's location highlighted. Workflow rules add checks that run on every document, such as net pay being less than gross pay or a statement period ending after it starts, and a failed rule flags the run. A field the document does not contain, like a missing year-to-date figure, comes back null instead of a guess.
Getting fields into the loan file
A whole packet can go in as one submission, and the result comes back split by document; the quickstart has the calls. Because every document shares one format under your own field names, the mapping into a loan file is done once rather than per form. There is no loan origination system connector or webhook today, so your code writes the JSON, or a processor exports it; webhooks and integrations are in design on the roadmap. Borrower income and account data rarely should leave your network, which is why Enterprise plans offer private VPC and fully air-gapped on-premises deployment, on models that run inside it.
Lenders who will not get much from it
- You need an income calculation or decisioning engine. docRefinery extracts; it does not underwrite.
- You need altered pay stubs or statements detected. Forgery and fraud detection is not offered; it is research on the roadmap.
- Your asset data already comes straight from banks as structured account data, so statements are rare.
- Most of your packets are handwritten or one-of-a-kind documents with no repeating layout.
Common questions
Can docRefinery split a mortgage packet into separate documents?
Yes. A long PDF is separated into the documents inside it, and each is recognised for what it is: pay stub, bank statement, W-2 and so on. A reviewer can correct a document's type in the classification queue, and fields are then extracted from each document under your organisation's field settings.
Does docRefinery calculate borrower income?
No. It extracts what the documents print, such as gross pay, pay period, year-to-date earnings and every transaction on a statement, with confidence scores and page citations. Income calculation and credit decisions stay with your underwriters and your own systems.
Can mortgage documents be processed without leaving our network?
Yes, on Enterprise plans, which support private VPC and fully air-gapped on-premises deployment. That is a deployment capability, not a compliance certificate. Long packets, segmentation, your field names and the output format work the same there. Starter and Team run on docRefinery's hosted service, with data retention from 7 days on Starter.
Do pay stubs and bank statements come back in different formats?
No. Every document in a packet returns the same format: fields with a value, your Return as alias, a confidence score and, where it can be placed, a location, and tables as rows. Only the field set differs, so one parser reads the whole loan file.
Sources
Related
- Bank statementTurn bank statement PDFs into balances and transaction rows. A table that comes back short is flagged, and extracted cells are tied to their page and position.
- What is document data extraction?Document data extraction turns PDFs and scans into structured fields. How OCR, IDP, extraction APIs and LLM parsing differ, and how to choose between them.
- Confidence scoresWhat a confidence score in document extraction means, how to set thresholds per field, when to send values to human review, and why null beats a guess.
- QuickstartSend your first document to the docRefinery extraction API: get a key, submit a PDF, poll for the result and read checked fields. curl, Python and JavaScript.
- CompareHow docRefinery compares with Reducto, Extend, LlamaParse, Unstructured, Textract, Azure and Google on output, review and deployment, including where we trail.
- Create your account | docRefineryCreate a docRefinery account with Google. Starter is free up to 100 pages a month.
- Use casesWhere document extraction fits best: accounts payable, lending, KYC, insurance claims, logistics, healthcare admin and contracts, wherever senders repeat.
Bring the documents your team handles.
Upload a real file and see each field with its confidence score, ready to check.
100 pages a month free. No credit card, no sales call.