Skip to main content
Prepare a Form 140 return (formerly Form 26Q) by reviewing your resident non-salary payment data, then generating a TXT file with the TDS Reports API. This recipe covers Q1 to Q4. After generating the TXT file, validate it with FVU and file the return.

Before you start

  • Get a Sandbox API key and access token using the Quickstart guide.
  • Use Bash, cURL, and jq for the examples. Set BASE_URL, API_KEY, and ACCESS_TOKEN for the same environment.
The examples use synthetic TAN AHMA00000C, TY 2026-27, and Q1. Use the workbook’s TAN in each job request. The job’s tax_year and quarter set the Potential Notices filing deadline. The workbook has no tax year or quarter fields.
1

Create a Potential Notices job

Call Submit Job for Form 140. Save data.job_id and data.input_json_url. The job starts as created and waits for your workbook.
2

Upload the Potential Notices workbook

Prepare your Form 140 Potential Notices workbook and save it as form140-notices.json. The sample input and JSON schema show its structure. Upload the file itself as the request body. Signed upload and download URLs do not need Sandbox authentication headers.Include relevant earlier payments when assessing thresholds. Those rows are also assessed and appear in the report. Cash withdrawals and online-game winnings are outside the supported calculation scope.
Potential Notices adds the payee’s boolean is_pan_operative and the challan’s utilized_amount, which records credit used outside this workbook. Prepare the Potential Notices and Reports workbooks against their own schemas. Date fields use Unix milliseconds.
3

Fetch and review the Potential Notices report

Call Poll Job with NOTICE_JOB_ID. Repeat while the status is created, queued, or in_progress, waiting between requests and applying a timeout in your integration. Stop on succeeded or failed. A 200 response means the polling request succeeded. Read data.status to find whether the job has finished.
On succeeded, download output_json_url or output_excel_url. A successful job can still contain potential notices. Read the Form 140 output reference for report fields and calculation limits.
In potential_notices_summary_table, Y means the assessment found a notice for a payment, challan, or the statement. N means the category is fully assessed with no notice. N/A means it could not be fully assessed and no assessed row establishes a notice. Use summary balances when reviewing amounts. Adding detail amounts to summary amounts counts the same charges twice.On failed, check message. Workbook row errors return validation_json_url and validation_excel_report_url when available. Other failures, including an invalid workbook structure or a TAN mismatch, may have no validation files.
Inspect the samples: output JSON, output Excel, validation JSON, and validation Excel. The validation examples use invalid as the first payee’s PAN. The JSON identifies the field and row, and Excel annotates cell B3 in payee_sheet.Correct your source data and submit a new job when needed. Download links expire after 24 hours. Poll again for fresh links. When you are ready, use the corrected data to prepare the Reports workbook for TXT generation.
4

Create a TXT job

Call Submit Job. Save the Reports job ID and its json_url. These belong to the TXT job, separate from the Potential Notices job.
5

Upload the Reports workbook

Prepare the Form 140 Reports workbook. The Reports sample and JSON schema show the required structure. Save your Reports Sheet JSON as form140.json, then upload it to the returned upload address. Send the JSON file itself as the request body.
6

Poll for the TXT file

Call Poll Job with TXT_JOB_ID. Repeat the request while processing continues, waiting between requests. Stop on succeeded or failed and apply a timeout in your integration.
On succeeded, download data.txt_url. On failed, download data.validation_report_url if present. Correct the workbook and create a new TXT job.

Validate and file the return

Follow File Form 140 TDS returns to obtain the CSI file, run FVU validation, and e-file the return. A generated TXT file still needs FVU validation before filing.