RequestByUrl
RequestByUrl
This is a payee-initiated method where the API generates a unique secure URL per recipient. You can share the URL directly with recipients or embed it in your platform as an iframe, and recipients can complete the form on their own.
When to use
- You want recipients to access and complete the form on their own, without sending a direct email or SMS invitation.
- You want to embed the form completion experience directly into your platform as an iframe, keeping recipients within your application.
If you want a single shared URL for all recipients under a payer, use RequestByBusinessUrl instead.
How it works
Authenticate
Obtain a Bearer token via the OAuth 2.0 flow and include it in all request headers.
Ensure a business (payer) exists
Before calling this endpoint, confirm the payer has been created using the Business endpoint. If no
BusinessIdis provided in the request, the request will be associated with the default payer (the first payer created in your account).Call the endpoint
Along with the payer and recipient details, your request may include the following optional parameters:
DBAId / DBARef— Scope the URL to a specific DBA under the payer. The DBA name will appear as the requester on the form.Customization— Apply your logo and primary/secondary colors to brand the form page. Alternatively, pass aCustomizationIdgenerated from the PortalCustomization endpoint.InterviewFlow— Set to TRUE to present the W-9 as a guided interview rather than a traditional form.ShowDownloadPage— Set to TRUE to give recipients the option to download their completed form.PrefLang— Specify the language for the form. Recipients can also change their preferred language if needed. Supported languages: English, French, Spanish, German, Ukrainian, and Portuguese.
Automate TIN MatchingSet
IsTINMatchingto TRUE to automatically trigger IRS TIN Matching once the recipient submits their form.Recipient completes the form
The API returns a
Urlin the response — a unique, recipient-specific secure URL. You can:- Embed it in your application or portal as an iframe.
- Share it directly with the recipient via your own email, SMS, or messaging system.
When the recipient opens the link, they select the applicable form — W-9, W-8BEN, W-8BEN-E, W-8ECI, W-8IMY, or W-8EXP — and complete, e-sign, and submit it.
Get notified
Once a recipient submits, you can receive notification through any of the following:
- Webhooks — Configure the 'WhCertificate Status Change' webhook event to receive a payload with the recipient's name, TIN, address, and a link to download the completed form. Learn more
- Status endpoint — Poll the Status endpoint on demand to retrieve the current form status for a given recipient.
- Web messaging — Receive in-browser notifications when a recipient completes their form. Learn more
POST WhCertificate/RequestByUrl Request Body
| Field | Type | Description |
|---|---|---|
| Requester | Object | Identifies the payer associated with this request. If omitted, the default payer in your account is used. |
| PayerRef | String | Optional Your unique identifier for the payer. Size: 1–50 |
| BusinessId | Guid | Optional TaxBandits-generated unique identifier for the payer. |
| TIN | String | Optional Taxpayer Identification Number of the payer. Can be used in place of BusinessId or PayerRef.Size: 9–11 |
| DBAId | String | Optional Unique identifier for the DBA. The DBA name appears as the requester on the form. |
| DBARef | String | Optional Your reference identifier for the DBA. Size: 1–50 |
| Recipient | Object[] | List of recipients to send the text request to. Each element represents one recipient. |
| PayeeRef | String | Optional Your unique identifier for the recipient, used to reference them in future API calls. Size: 1–50 |
| FedTaxClass | String | Optional Federal tax classification of the recipient. Pre-filled on the form. |
| Name | String | Optional Recipient's name. Pre-filled on the form. Size: 1–50 |
| IsForeign | Boolean | Optional Set to TRUE if the recipient has a foreign address. When TRUE, pass address details under ForeignAddress instead of USAddress. |
| USAddress | Object | Optional Recipient's US mailing address. Pre-filled on the form. |
| Address1 | String | Optional Street address or PO Box. Size: 1–46 |
| Address2 | String | Optional Suite or apartment number. Size: 1–46 |
| City | String | Optional City. Size: 1–46 |
| State | String | Optional Two-letter state code. Size: 2 |
| ZipCd | String | Optional ZIP code. Format: 99999 or 99999-9999. Size: 5–10 |
| ForeignAddress | Object | Optional Recipient's foreign address. Required when IsForeign is TRUE. |
| Address1 | String | Optional Street address or PO Box. Size: 1–50 |
| Address2 | String | Optional Suite or apartment number. Size: 1–50 |
| City | String | Optional City. Size: 1–50 |
| ProvinceOrStateNm | String | Optional Province or state name. Size: 1–50 |
| PostalCd | String | Optional Postal code. Size: 1–16 |
| IsTINMatching | Boolean | Optional Set to TRUE to automatically trigger IRS TIN Matching once the recipient submits their W-9. |
| CustomizationId | Guid | Optional A unique identifier for a saved customization profile, generated via the Developer Console or the PortalCustomization endpoint. Applies your branding to the form page. |
| Customization | Object | Optional Inline branding settings for the form completion page. Use this if you do not have a CustomizationId. |
| BusinessLogoUrl | String | Optional URL of the logo to display on the form page. Size: 1–150 |
| LogoPosition | String | Optional Position of the logo on the form page.Allowed values"LEFT", "CENTER", "RIGHT" |
| InterviewFlow | Boolean | Optional Set to TRUE to present the W-9 as a guided step-by-step interview instead of the traditional form layout. |
| PrimaryColor | String | Optional Primary brand color for the form page. |
| SecondaryColor | String | Optional Secondary brand color for the form page. |
| ShowDownloadPage | Boolean | Optional Set to TRUE to give recipients the option to download their completed form after submission. |
| PrefLang | String | Optional Default display language for the form. Defaults to English if not set.Allowed values"en-US", "es-ES", "fr-FR", "de-DE", "uk-UA", "pt-PT" |
| RedirectUrls | Object | Optional Redirect settings after form submission or cancellation. |
| ReturnUrl | String | Optional URL to redirect the recipient after successfully submitting the form. Size: 1–150 |
| CancelUrl | String | Optional URL to redirect the recipient if they click cancel. If not provided, the cancel button is not shown. Size: 1–150 |
| RedirectTime | Number | Optional Time in seconds before the redirect occurs. Size: 5–300 |
Response Body
| Field | Type | Description |
|---|---|---|
| SubmissionId | Guid | TaxBandits-generated unique identifier for this submission. |
| PayeeRef | String | Your unique identifier for the payer. |
| Url | String | The unique secure URL generated for this recipient. Embed it in your portal or share it directly. |
| Errors | object[] | List of error details if the request failed. Null on success. |
| Id | string | TaxBandits-assigned error code. |
| Name | string | Field or node that triggered the error. |
| Message | string | Human-readable error description. |
Request Json
- Sample 1
- Sample 2
- Sample 3
- Sample 4
- Sample 5
Request URL with TIN Matching and redirect URLs
Generate a secure URL with the recipient's details pre-filled, TIN Matching enabled to validate their TIN on submission, and redirect URLs configured.
{
"Requester": {
"PayerRef": null,
"BusinessId": null,
"TIN": null,
"DBAId": null,
"DBARef": null
},
"Recipient": {
"PayeeRef": "SG7356",
"FedTaxClass": "INDIVIDUAL",
"Name": "David Smith",
"IsForeign": true,
"USAddress": {
"Address1": "1751 Kinsey Rd",
"Address2": "Main St",
"City": "Dothan",
"State": "AL",
"ZipCd": "36303"
},
"ForeignAddress": {
"Address1": "1751 Kinsey Rd",
"Address2": "Main St",
"City": "Dothan",
"ProvinceOrStateNm": "TN",
"Country": "IN",
"PostalCd": "641016"
},
"IsTINMatching": true
},
"Customization": {
"BusinessLogoUrl": "https://www.spanenterprises.com/Content/Images/span.png",
"LogoPosition": "CENTER",
"InterviewFlow": true,
"PrimaryColor": "#1be6f5",
"SecondaryColor": "#9c9276",
"ShowDownloadPage": true
},
"RedirectUrls": {
"ReturnUrl": "https://example.com",
"CancelUrl": "https://example.com",
"RedirectTime": 60
}
}
Request URL with BusinessId and redirect URLs
Generate a secure URL linked to a specific payer using BusinessId, with redirect URLs so the recipient is sent back to your platform after form completion.
{
"Requester": {
"PayerRef": null,
"BusinessId": "0D12C79F-5FD6-4983-9809-023F0C2BF826",
"TIN": null,
"DBAId": null,
"DBARef": null
},
"Recipient": {
"PayeeRef": "123456",
"Name": "John",
"IsTINMatching": true
},
"Customization": null,
"RedirectUrls": {
"ReturnUrl": "https://example.com",
"CancelUrl": "https://example.com"
}
}
Request URL with DBA details
Generate a secure URL scoped to a specific DBA. TIN Matching is enabled.
{
"Requester": {
"PayerRef": null,
"BusinessId": null,
"TIN": null,
"DBAId": "dba263",
"DBARef": "c33e7ecc-334f-4a45-8eb3-3114281a61e5"
},
"Recipient": {
"PayeeRef": "123456",
"Name": "John",
"IsForeign": false,
"USAddress": {
"Address1": "1751 Kinsey Rd",
"Address2": "Main St",
"City": "Dothan",
"State": "AL",
"ZipCd": "36303"
},
"ForeignAddress": null,
"IsTINMatching": true
},
"Customization": null,
"RedirectUrls": null
}
Request URL with PayerRef and PayeeRef
Generate a secure URL using your own payer and recipient reference identifiers instead of TaxBandits-generated IDs.
{
"Requester": {
"PayerRef": "3746HFT27"
},
"Recipient": {
"PayeeRef": "34ER3763",
"Name": "Michal Thomas",
"IsTINMatching": true
},
"RedirectUrls": {
"ReturnUrl": "https://exampleweblink1.com",
"CancelUrl": "https://exampleweblink2.com"
}
}
Request URL with saved customization profile
Generate a secure URL with a pre-configured branding profile applied using a CustomizationId, so the form completion page reflects your platform's logo and color theme without passing inline customization settings.
{
"Requester": {
"PayerRef": null,
"BusinessId": "011d9058-fc7c-4182-bb4e-68d5ed7d7b2c",
"TIN": null,
"DBAId": null,
"DBARef": null
},
"Recipient": {
"PayeeRef": "123459",
"Name": "Michal",
"IsTINMatching": true
},
"CustomizationId": "0ecbdb4f-4cf0-440f-b412-8793eeaf6ee1",
"Customization": null,
"RedirectUrls": {
"ReturnUrl": "https://exampleweblink1.com",
"CancelUrl": "https://exampleweblink2.com"
}
}
Response JSON
- 200
- 400
- 401
Success Response - This is a sample response for successful API requests.
{
"SubmissionId": "7971f12e-fc8f-4d88-91c9-deb4696d3612",
"PayeeRef": "123456",
"Url": "https://testlinks.taxbandits.io?whId=7b20d2c0-6585-435c-89c7-3a01b13d33ef",
"Errors": null
}
Bad Request Response - You'll get the below response when your API requests contain any validation errors.
{
"SubmissionId": null,
"PayeeRef": "12345737498832749827344982738877239887293934798324798832274898874788",
"Url": null,
"Errors": [
{
"Id": "F68-100152",
"Name": "PayeeRef",
"Message": "PayeeReference can only have maximum of 50 characters"
}
]
}
Unauthorized Response - You'll get the below response when your API requests don't contain valid authentication credentials.
{
"StatusCode": 401,
"StatusName": "Unauthorized",
"StatusMessage": "Invalid authorization credentials",
"Errors": [
{
"Id": "AUTH-100025",
"Name": "Authorization",
"Message": "Authorization should not be empty"
}
]
}