{
  "openapi": "3.0.3",
  "info": {
    "title": "LSync Practice Suite — Tax Calculator API",
    "version": "1.0.0",
    "description": "Free, unauthenticated Indian tax calculators: income tax (both regimes), capital gains, HRA, TDS on salary, gratuity, EMI, GST split and presumptive income. Pure computations from published Finance Act rate tables — no government data is fetched. Every response carries the working (`trace`) and the rate-table version (`rulesVersion`, `verified`).\n\nRate limit: 60 requests a minute and 2,000 a day per IP; see the X-RateLimit-* headers. CORS is open.\n\nResults are estimates, not tax advice; verify with a qualified professional. The suite itself is at https://hub.lsync.io/register-firm."
  },
  "servers": [
    {
      "url": "https://ca.lsync.io/api/public/calc"
    }
  ],
  "tags": [
    {
      "name": "calculators"
    },
    {
      "name": "meta"
    }
  ],
  "paths": {
    "/version": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Engine version and rule tables",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Version"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/income-tax": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "Income tax under both regimes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncomeTaxRequest"
              },
              "example": {
                "fy": "2025-26",
                "age": 30,
                "regime": "both",
                "income": {
                  "salary": 1800000,
                  "savingsInterest": 12000
                },
                "deductions": {
                  "sec80C": 150000,
                  "sec80D": {
                    "self": 25000
                  }
                },
                "hra": {
                  "basic": 900000,
                  "hraReceived": 300000,
                  "rentPaid": 240000,
                  "metro": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/IncomeTaxResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/capital-gains": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "Capital gains on one asset",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CapitalGainsRequest"
              },
              "example": {
                "assetType": "land_building",
                "purchaseDate": "2015-06-01",
                "saleDate": "2025-01-15",
                "purchasePrice": 5000000,
                "salePrice": 10000000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/CapitalGainsResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/hra": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "HRA exemption (Sec 10(13A))",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HraRequest"
              },
              "example": {
                "period": "monthly",
                "basic": 50000,
                "hraReceived": 20000,
                "rentPaid": 18000,
                "metro": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/HraResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/tds-salary": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "Monthly TDS on salary (Sec 192)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TdsSalaryRequest"
              },
              "example": {
                "fy": "2025-26",
                "age": 30,
                "regime": "new",
                "income": {
                  "salary": 1800000
                },
                "monthsRemaining": 12
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/TdsSalaryResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/gratuity": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "Gratuity and its exemption (Sec 10(10))",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GratuityRequest"
              },
              "example": {
                "monthlySalary": 50000,
                "yearsOfService": 10,
                "monthsOfService": 7,
                "coveredUnderAct": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/GratuityResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/emi": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "Loan EMI and amortisation schedule",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmiRequest"
              },
              "example": {
                "principal": 1000000,
                "annualRate": 8.5,
                "tenureMonths": 240,
                "schedule": "yearly"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/EmiResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/gst": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "GST inclusive / exclusive split",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GstRequest"
              },
              "example": {
                "amount": 1000,
                "rate": 18,
                "mode": "exclusive",
                "supply": "intra"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/GstResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/presumptive": {
      "post": {
        "tags": [
          "calculators"
        ],
        "summary": "Presumptive income (Sec 44AD / 44ADA)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresumptiveRequest"
              },
              "example": {
                "fy": "2025-26",
                "scheme": "44AD",
                "turnover": 10000000,
                "cashReceipts": 2000000,
                "age": 35
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per minute"
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the minute allowance is full"
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "engine": {
                      "type": "string",
                      "example": "1.0.0"
                    },
                    "result": {
                      "$ref": "#/components/schemas/PresumptiveResult"
                    },
                    "terms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "engine",
                    "result",
                    "terms"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TraceStep": {
        "type": "object",
        "description": "One line of the computation working",
        "properties": {
          "label": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "note": {
            "type": "string"
          },
          "section": {
            "type": "string",
            "description": "Statutory reference, e.g. 87A"
          },
          "kind": {
            "type": "string",
            "enum": [
              "line",
              "sub",
              "total",
              "info"
            ]
          },
          "unit": {
            "type": "string",
            "enum": [
              "inr",
              "number",
              "percent"
            ]
          }
        },
        "required": [
          "label"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "string"
          },
          "issues": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "retryAfterSeconds": {
            "type": "integer"
          }
        },
        "required": [
          "ok",
          "error"
        ]
      },
      "Version": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "engine": {
            "type": "string"
          },
          "defaultFy": {
            "type": "string"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fy": {
                  "type": "string",
                  "example": "2025-26"
                },
                "rulesVersion": {
                  "type": "string",
                  "example": "2025-26.1",
                  "description": "Version of the rate table used"
                },
                "verified": {
                  "type": "boolean",
                  "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
                },
                "ay": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "note": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "openapi": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          }
        }
      },
      "Deductions": {
        "type": "object",
        "description": "Chapter VI-A deductions (old regime). Caps are applied by the engine.",
        "properties": {
          "sec80C": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "sec80CCD1B": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "sec80D": {
            "type": "object",
            "properties": {
              "self": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "parents": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "parentsSenior": {
                "type": "boolean"
              },
              "preventiveCheckup": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              }
            }
          },
          "sec80E": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "sec80G": {
            "type": "object",
            "properties": {
              "full": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "half": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "fullWithLimit": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "halfWithLimit": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              }
            }
          },
          "sec80U": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "sec80DD": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "sec80GG": {
            "type": "object",
            "properties": {
              "rentPaid": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              }
            },
            "required": [
              "rentPaid"
            ]
          },
          "other": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          }
        }
      },
      "Hra": {
        "type": "object",
        "properties": {
          "basic": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "da": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "hraReceived": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rentPaid": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "metro": {
            "type": "boolean",
            "description": "Delhi, Mumbai, Kolkata or Chennai"
          }
        },
        "required": [
          "basic",
          "hraReceived",
          "rentPaid"
        ]
      },
      "Income": {
        "type": "object",
        "properties": {
          "salary": {
            "type": "number",
            "minimum": 0,
            "description": "Gross salary including all allowances and HRA received"
          },
          "basicSalary": {
            "type": "number",
            "minimum": 0,
            "description": "Basic + DA, for the 80CCD(2) cap"
          },
          "professionalTax": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "employerNps": {
            "type": "number",
            "minimum": 0,
            "description": "Employer NPS contribution, Sec 80CCD(2)"
          },
          "otherIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "savingsInterest": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "depositInterest": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "familyPension": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "businessIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Net profit of business / profession"
          },
          "houseProperty": {
            "type": "object",
            "properties": {
              "selfOccupiedInterest": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "letOut": {
                "type": "object",
                "properties": {
                  "annualRent": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Amount in rupees"
                  },
                  "municipalTaxes": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Amount in rupees"
                  },
                  "interest": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Amount in rupees"
                  }
                },
                "required": [
                  "annualRent"
                ]
              }
            }
          },
          "capitalGains": {
            "type": "object",
            "description": "Net gains already computed; use /capital-gains for a single asset",
            "properties": {
              "stcgEquity": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "ltcgEquity": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "ltcgOther": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "stcgOther": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              }
            }
          }
        }
      },
      "RegimeResult": {
        "type": "object",
        "properties": {
          "regime": {
            "type": "string",
            "enum": [
              "new",
              "old"
            ]
          },
          "label": {
            "type": "string"
          },
          "grossSalary": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "hraExempt": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "standardDeduction": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "incomeFromSalary": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "incomeFromHouseProperty": {
            "type": "number"
          },
          "businessIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "incomeFromOtherSources": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "grossTotalIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "deductions": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "deductionBreakup": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "totalIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "taxOnNormalIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "taxOnSpecialIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rebate87A": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "taxAfterRebate": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "surchargeRate": {
            "type": "number"
          },
          "surcharge": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "marginalRelief": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "cess": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "totalTax": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "effectiveRate": {
            "type": "number",
            "description": "Total tax ÷ gross total income"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "IncomeTaxRequest": {
        "type": "object",
        "required": [
          "fy",
          "age"
        ],
        "properties": {
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Financial year; one of the years listed by GET /version"
          },
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120,
            "example": 30
          },
          "regime": {
            "type": "string",
            "enum": [
              "new",
              "old",
              "both"
            ],
            "default": "both"
          },
          "income": {
            "$ref": "#/components/schemas/Income"
          },
          "deductions": {
            "$ref": "#/components/schemas/Deductions"
          },
          "hra": {
            "type": "object",
            "properties": {
              "basic": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "da": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "hraReceived": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "rentPaid": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "metro": {
                "type": "boolean",
                "description": "Delhi, Mumbai, Kolkata or Chennai"
              }
            },
            "required": [
              "basic",
              "hraReceived",
              "rentPaid"
            ],
            "description": "Annual figures for the Sec 10(13A) working (old regime only)"
          }
        }
      },
      "IncomeTaxResult": {
        "type": "object",
        "properties": {
          "fy": {
            "type": "string",
            "example": "2025-26"
          },
          "rulesVersion": {
            "type": "string",
            "example": "2025-26.1",
            "description": "Version of the rate table used"
          },
          "verified": {
            "type": "boolean",
            "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
          },
          "ay": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120,
            "example": 30
          },
          "ageBand": {
            "type": "string",
            "enum": [
              "general",
              "senior",
              "superSenior"
            ]
          },
          "new": {
            "$ref": "#/components/schemas/RegimeResult"
          },
          "old": {
            "$ref": "#/components/schemas/RegimeResult"
          },
          "recommended": {
            "type": "string",
            "enum": [
              "new",
              "old"
            ]
          },
          "savings": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          }
        }
      },
      "CapitalGainsRequest": {
        "type": "object",
        "required": [
          "assetType",
          "purchaseDate",
          "saleDate",
          "purchasePrice",
          "salePrice"
        ],
        "properties": {
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Defaults to the FY of the sale date"
          },
          "assetType": {
            "type": "string",
            "enum": [
              "listed_equity",
              "equity_mf",
              "debt_mf",
              "listed_other",
              "unlisted_shares",
              "land_building",
              "gold",
              "other"
            ]
          },
          "purchaseDate": {
            "type": "string",
            "format": "date",
            "example": "2025-06-15"
          },
          "saleDate": {
            "type": "string",
            "format": "date",
            "example": "2025-06-15"
          },
          "purchasePrice": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "salePrice": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "improvementCost": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "improvementDate": {
            "type": "string",
            "format": "date",
            "example": "2025-06-15"
          },
          "transferExpenses": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "fmvOn31Jan2018": {
            "type": "number",
            "minimum": 0,
            "description": "Sec 112A grandfathering for equity held on 31 Jan 2018"
          },
          "fmvOn1Apr2001": {
            "type": "number",
            "minimum": 0,
            "description": "Substitute cost for assets acquired before 1 Apr 2001"
          }
        }
      },
      "CapitalGainsResult": {
        "type": "object",
        "properties": {
          "fy": {
            "type": "string",
            "example": "2025-26"
          },
          "rulesVersion": {
            "type": "string",
            "example": "2025-26.1",
            "description": "Version of the rate table used"
          },
          "verified": {
            "type": "boolean",
            "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
          },
          "assetType": {
            "type": "string"
          },
          "holdingMonths": {
            "type": "integer"
          },
          "holdingRequiredMonths": {
            "type": "integer"
          },
          "isLongTerm": {
            "type": "boolean"
          },
          "section": {
            "type": "string",
            "description": "111A, 112A, 112, 50AA or slab"
          },
          "computations": {
            "type": "array",
            "description": "One entry, or two when the land/building grandfather option applies",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "cost": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "indexedCost": {
                  "type": "number",
                  "nullable": true
                },
                "improvement": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "indexedImprovement": {
                  "type": "number",
                  "nullable": true
                },
                "transferExpenses": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "gain": {
                  "type": "number"
                },
                "exemption": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "taxableGain": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "rate": {
                  "type": "number",
                  "nullable": true
                },
                "tax": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          },
          "chosen": {
            "type": "integer"
          },
          "gain": {
            "type": "number"
          },
          "taxableGain": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rate": {
            "type": "number",
            "nullable": true,
            "description": "Null when taxed at slab rates"
          },
          "tax": {
            "type": "number",
            "nullable": true
          },
          "taxWithCess": {
            "type": "number",
            "nullable": true
          },
          "note": {
            "type": "string"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "HraRequest": {
        "type": "object",
        "required": [
          "basic",
          "hraReceived",
          "rentPaid"
        ],
        "properties": {
          "basic": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "da": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "hraReceived": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rentPaid": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "metro": {
            "type": "boolean",
            "description": "Delhi, Mumbai, Kolkata or Chennai"
          },
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Financial year; one of the years listed by GET /version"
          },
          "period": {
            "type": "string",
            "enum": [
              "annual",
              "monthly"
            ],
            "default": "annual",
            "description": "Monthly inputs are annualised"
          }
        }
      },
      "HraResult": {
        "type": "object",
        "properties": {
          "fy": {
            "type": "string",
            "example": "2025-26"
          },
          "rulesVersion": {
            "type": "string",
            "example": "2025-26.1",
            "description": "Version of the rate table used"
          },
          "verified": {
            "type": "boolean",
            "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
          },
          "period": {
            "type": "string"
          },
          "salary": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "actualHra": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rentOverTenPercent": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "salaryShare": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "salaryShareRate": {
            "type": "number"
          },
          "exempt": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "taxable": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "TdsSalaryRequest": {
        "type": "object",
        "required": [
          "fy",
          "age"
        ],
        "properties": {
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Financial year; one of the years listed by GET /version"
          },
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120,
            "example": 30
          },
          "regime": {
            "type": "string",
            "enum": [
              "new",
              "old"
            ],
            "default": "new"
          },
          "income": {
            "$ref": "#/components/schemas/Income"
          },
          "deductions": {
            "$ref": "#/components/schemas/Deductions"
          },
          "hra": {
            "type": "object",
            "properties": {
              "basic": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "da": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "hraReceived": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "rentPaid": {
                "type": "number",
                "minimum": 0,
                "description": "Amount in rupees"
              },
              "metro": {
                "type": "boolean",
                "description": "Delhi, Mumbai, Kolkata or Chennai"
              }
            },
            "required": [
              "basic",
              "hraReceived",
              "rentPaid"
            ]
          },
          "monthsRemaining": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "default": 12
          },
          "tdsAlreadyDeducted": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          }
        }
      },
      "TdsSalaryResult": {
        "type": "object",
        "properties": {
          "fy": {
            "type": "string",
            "example": "2025-26"
          },
          "rulesVersion": {
            "type": "string",
            "example": "2025-26.1",
            "description": "Version of the rate table used"
          },
          "verified": {
            "type": "boolean",
            "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
          },
          "regime": {
            "type": "string",
            "enum": [
              "new",
              "old"
            ]
          },
          "annualTax": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "tdsAlreadyDeducted": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "balanceTax": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "monthsRemaining": {
            "type": "integer"
          },
          "monthlyTds": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "computation": {
            "$ref": "#/components/schemas/RegimeResult"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "GratuityRequest": {
        "type": "object",
        "required": [
          "monthlySalary",
          "yearsOfService"
        ],
        "properties": {
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Financial year; one of the years listed by GET /version"
          },
          "monthlySalary": {
            "type": "number",
            "minimum": 0,
            "description": "Last drawn monthly basic + DA"
          },
          "yearsOfService": {
            "type": "number",
            "minimum": 0
          },
          "monthsOfService": {
            "type": "integer",
            "minimum": 0,
            "maximum": 11
          },
          "coveredUnderAct": {
            "type": "boolean",
            "default": true
          },
          "employerType": {
            "type": "string",
            "enum": [
              "government",
              "private"
            ]
          },
          "gratuityReceived": {
            "type": "number",
            "minimum": 0,
            "description": "Defaults to the formula amount"
          },
          "averageSalaryLast10Months": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          }
        }
      },
      "GratuityResult": {
        "type": "object",
        "properties": {
          "fy": {
            "type": "string",
            "example": "2025-26"
          },
          "rulesVersion": {
            "type": "string",
            "example": "2025-26.1",
            "description": "Version of the rate table used"
          },
          "verified": {
            "type": "boolean",
            "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
          },
          "eligible": {
            "type": "boolean"
          },
          "yearsCounted": {
            "type": "integer"
          },
          "formulaGratuity": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "gratuityReceived": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "exemptionCap": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "exempt": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "taxable": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "EmiRequest": {
        "type": "object",
        "required": [
          "principal",
          "annualRate",
          "tenureMonths"
        ],
        "properties": {
          "principal": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "annualRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Percent per annum"
          },
          "tenureMonths": {
            "type": "integer",
            "minimum": 1,
            "maximum": 600
          },
          "schedule": {
            "type": "string",
            "enum": [
              "yearly",
              "monthly",
              "none"
            ],
            "default": "yearly"
          }
        }
      },
      "EmiResult": {
        "type": "object",
        "properties": {
          "principal": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "annualRate": {
            "type": "number"
          },
          "tenureMonths": {
            "type": "integer"
          },
          "emi": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "totalInterest": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "totalPayment": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "interestShare": {
            "type": "number"
          },
          "scheduleKind": {
            "type": "string"
          },
          "schedule": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "period": {
                  "type": "integer"
                },
                "principalPaid": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "interestPaid": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                },
                "balance": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Amount in rupees"
                }
              }
            }
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "GstRequest": {
        "type": "object",
        "required": [
          "amount",
          "rate"
        ],
        "properties": {
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Financial year; one of the years listed by GET /version"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "GST rate in percent"
          },
          "mode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ],
            "default": "exclusive"
          },
          "supply": {
            "type": "string",
            "enum": [
              "intra",
              "inter"
            ],
            "default": "intra"
          },
          "cessRate": {
            "type": "number",
            "minimum": 0,
            "description": "Compensation cess in percent"
          }
        }
      },
      "GstResult": {
        "type": "object",
        "properties": {
          "taxableValue": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "rate": {
            "type": "number"
          },
          "mode": {
            "type": "string"
          },
          "supply": {
            "type": "string"
          },
          "cgst": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "sgst": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "igst": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "cess": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "totalTax": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "total": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "amountInWords": {
            "type": "string"
          },
          "standardRates": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "rateNote": {
            "type": "string"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      },
      "PresumptiveRequest": {
        "type": "object",
        "required": [
          "fy",
          "scheme",
          "turnover"
        ],
        "properties": {
          "fy": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "example": "2025-26",
            "description": "Financial year; one of the years listed by GET /version"
          },
          "scheme": {
            "type": "string",
            "enum": [
              "44AD",
              "44ADA"
            ]
          },
          "turnover": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "cashReceipts": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "declaredIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120,
            "example": 30,
            "description": "Supply to also receive the tax under both regimes"
          },
          "otherIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "deductions": {
            "$ref": "#/components/schemas/Deductions"
          },
          "computeTax": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "PresumptiveResult": {
        "type": "object",
        "properties": {
          "fy": {
            "type": "string",
            "example": "2025-26"
          },
          "rulesVersion": {
            "type": "string",
            "example": "2025-26.1",
            "description": "Version of the rate table used"
          },
          "verified": {
            "type": "boolean",
            "description": "False when the table is a provisional copy awaiting verification against the enacted Finance Act"
          },
          "scheme": {
            "type": "string"
          },
          "turnover": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "cashReceipts": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "digitalReceipts": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "cashShare": {
            "type": "number"
          },
          "limitApplied": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "eligible": {
            "type": "boolean"
          },
          "deemedIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "presumptiveIncome": {
            "type": "number",
            "minimum": 0,
            "description": "Amount in rupees"
          },
          "tax": {
            "$ref": "#/components/schemas/IncomeTaxResult"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
