POST
/v1/tax/capital-gains- Authentication
- Bearer token
- Scope
tax:calc
Before you integrate
- Rates and the exemption are applied exactly as you send them. If you leave them out, the defaults shown above are used, so pass the current figures explicitly.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
equity_stcg_minor | integer | No | Short-term equity gain in paise; 0 or more. Defaults to 0. |
equity_ltcg_minor | integer | No | Long-term equity gain in paise; 0 or more. Defaults to 0. |
stcg_rate | number | No | Short-term tax rate as a fraction from 0 to 1. Defaults to 0.15; send the rate you want applied. |
ltcg_rate | number | No | Long-term tax rate as a fraction from 0 to 1. Defaults to 0.10; send the rate you want applied. |
ltcg_exemption_minor | integer | No | Yearly long-term exemption in paise. Defaults to 10000000 (Rs 1,00,000); send the amount you want applied. |
Sample code
Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.
curl -sS -X POST 'https://grappi.ai/v1/tax/capital-gains' \
-H "Authorization: Bearer $GRAPPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"equity_ltcg_minor": 15000000
}'Sample response
{
"request_id": "req_01HZY3K8M2",
"result": {
"stcg_tax_minor": 0,
"ltcg_taxable_minor": 5000000,
"ltcg_exemption_applied_minor": 10000000,
"ltcg_tax_minor": 500000,
"cess_minor": 20000,
"total_tax_minor": 520000
}
}Response fields
| Field | Type | Description |
|---|---|---|
stcg_tax_minor | integer | Tax on short-term gains in paise. |
ltcg_taxable_minor | integer | Long-term gain left after the exemption, in paise. |
ltcg_exemption_applied_minor | integer | Exemption actually used, in paise. |
ltcg_tax_minor | integer | Tax on long-term gains in paise. |
cess_minor | integer | Cess on both taxes in paise. |
total_tax_minor | integer | Total tax payable in paise. |
Errors
Every failure has the same shape. A call that fails on our side or at the data source is refunded to your wallet; a "no record found" answer is charged. See the error reference.