Forms / IRS
Fill Form W-9 programmatically
Form W-9 — Request for Taxpayer Identification Number and Certification. Official IRS PDF, 6 pages, 23 fields read automatically.
Before a US platform pays a vendor or contractor, it needs a W-9 on file. Most systems handle that by emailing the IRS PDF and hoping it comes back — or by building a custom form, then a PDF stamper, then keeping both in step with the IRS revision. The data is already in your onboarding flow; what's missing is the step that turns it into the signed form the IRS layout expects.
What you send
Real field names, straight from the PDF — the excerpt shows the first 5 of 23. The full list is in the table below, and the template hands you the complete JSON schema to copy.
{
"data": {
"topmostSubform[0].Page1[0].f1_01[0]": "string",
"topmostSubform[0].Page1[0].f1_02[0]": "string",
"topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[0]": true,
"topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[1]": true,
"topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[2]": true
}
}
// …plus 18 more fields, all listed belowWhat you get back
The completed Form W-9, streamed back as the response — or delivered to your webhook, HMAC-signed.
curl -X POST https://www.doc2api.co/api/v1/templates/<ID>/fill \ -H "X-Api-Key: d2a_live_…" \ -H "Content-Type: application/json" \ -d @payload.json -o filled.pdf # → the completed Form W-9 as a PDF. # With a webhook configured, the reply is JSON and the # document arrives at your endpoint as a signed URL.
Or skip the mapping entirely: embed the actual form on your site and let the person it belongs to fill and sign it — you receive the values as JSON and the finished PDF.
Every field on Form W-9
Extracted automatically from the official PDF — this table is generated by the same code that reads your uploads. In the editor, each of these is highlighted on the page itself, so you never map a name blind.
| Field name | Type | Notes |
|---|---|---|
| topmostSubform[0].Page1[0].f1_01[0] | text | |
| topmostSubform[0].Page1[0].f1_02[0] | text | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[0] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[1] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[2] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[3] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[4] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[5] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].f1_03[0] | text | max 1 char |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[6] | checkbox | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].f1_04[0] | text | |
| topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_2[0] | checkbox | |
| topmostSubform[0].Page1[0].f1_05[0] | text | |
| topmostSubform[0].Page1[0].f1_06[0] | text | |
| topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_07[0] | text | |
| topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_08[0] | text | |
| topmostSubform[0].Page1[0].f1_09[0] | text (multiline) | |
| topmostSubform[0].Page1[0].f1_10[0] | text | |
| topmostSubform[0].Page1[0].f1_11[0] | text | max 3 chars |
| topmostSubform[0].Page1[0].f1_12[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_13[0] | text | max 4 chars |
| topmostSubform[0].Page1[0].f1_14[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_15[0] | text | max 7 chars |
Those field names are the IRS's, not ours
The W-9's inputs really are called things like topmostSubform[0].Page1[0].f1_01[0] — the IRS authors its PDFs in tooling that generates names, and every vendor reading the file sees the same ones. The editor shows you each box highlighted on the page, so you map your data to what you can see rather than decoding a naming scheme. The TIN boxes also carry per-character limits, which the schema preserves so a nine-digit EIN can't silently truncate.
Questions people ask
- Can I collect W-9s electronically?
- Yes — the IRS permits payers to establish an electronic system for collecting W-9s, provided the information and certification are captured and the submitter e-signs. Doc2api's embed SDK renders the actual PDF with a draw-to-sign signature field, and the completed, signed document is delivered to your webhook.
- Do I get the completed PDF back or a link?
- The fill endpoint returns the finished PDF in the response, and can also deliver it to a webhook you configure — signed, so you can verify it came from us.
See your Form W-9 pipeline working in the next five minutes
The button uploads the official PDF into the editor as a live template with an API key — no account, nothing to cancel. Trial documents are watermarked and kept for 24 hours; sign up to keep your work.
Doc2api is not affiliated with the Internal Revenue Service. Form W-9 is a public government work; the copy here is the official revision, refreshed from irs.gov. Nothing on this page is tax or legal advice — how a completed form may be signed, filed or retained is defined by the issuing agency.