Before you start
- Get a Sandbox API key and access token using the Quickstart guide.
- Prepare the Form 140 TXT file for your TAN, tax year, and quarter. You can use the TDS Reports API to generate it.
- Keep the TAN and a mobile number for CSI OTP verification ready. Obtain the user’s consent before requesting the OTP.
File the return
Request the CSI OTP
Call Generate CSI OTP with the TAN, mobile number, and challan date range.The example covers 1 April to 31 July 2026 in IST. The timestamps are in milliseconds. Adjust the range to include all challans needed for the return.Save
data.reference_id for OTP verification. If the response has no reference ID, check its message before continuing.Verify the OTP and download CSI
Call Verify CSI OTP with the reference ID and the OTP received.Use
data.csi_url to download the file. If verification fails, resolve the error before continuing.Create an FVU job
Call Generate FVU with the return details. This guide uses Save
"regular" as the filing type.data.job_id as your FVU job ID. The response also provides data.txt_file_upload_url and data.csi_file_upload_url for the next step.Upload the TXT and CSI files
Upload both files to the URLs returned by the FVU job. Use the signed upload URLs directly.Confirm that both uploads succeed before checking the job.
Check validation and download the FVU ZIP
Call Get FVU job status with the FVU job ID.Check
data.status; an HTTP 200 response alone does not mean validation succeeded. Poll until the job reaches succeeded or failed.If it fails, review the validation report at data.validation_report_file_url when provided. Correct the return and create a new FVU job.When it succeeds, download data.fvu_zip_file_url. Check that the ZIP contains the FVU file and Form 27A.Create an e-filing job
Call E-file TDS return using the same TAN, tax year, quarter, and form as the validated return.Save the new
data.job_id as your e-filing job ID. It is separate from the FVU job ID. Use data.fvu_upload_file_url for the upload.Upload the FVU ZIP
Upload the ZIP containing the validated FVU file and Form 27A.Creating a job does not complete the filing. After the upload succeeds, check the e-filing status.
Check filing status and download the receipt
Call Get TDS e-filing status with the e-filing job ID.Poll until
data.status is succeeded or failed. If the job fails, read data.message and resolve the error.When it succeeds, save data.receipt_number and download the receipt from data.receipt_file_url.After filing
After TRACES processes the Form 140 statement and makes the certificates available, follow the Form 131 certificate guide.Related guides
- FVU webhooks and e-filing webhooks: Receive job completion updates instead of polling.
- Job-based API workflow: Learn how file uploads and background jobs work.
- TDS compliance API overview: Explore CSI download, return validation, e-filing, and TDS certificates.