---
title: "Calculate Tax"
method: POST
path: "/api/v1/wallet/calculate-tax"
tags: ["Wallet"]
---

# Calculate Tax

`POST /api/v1/wallet/calculate-tax`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/wallet/calculate-tax`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Calculate tax for a top-up or subscription based on country code.

## Request body

- TaxCalculationRequest: Request schema for calculating taxes.
  - `country_code` string, required: ISO country code (e.g. IN, US)
  - `amount_in_usd` number, required: Amount in USD to calculate tax on

## Response `200`

Successful Response

- TaxCalculationResponse: Response schema for tax calculation. Note: tokens_per_month represents: - For subscription: tokens credited per month - For topup: total tokens in single purchase (field name kept for consistency)
  - `success` boolean
  - `country_code` string, required
  - `currency` string, required
  - `amount_in_currency` number, required
  - `tokens_per_month` integer, required
  - `tax_percentage` number, required
  - `tax_amount` number, required
  - `total_amount` number, required
  - `tax_details` object[], nullable
  - `error` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `422`: Validation Error
- `500`: Internal Server Error

---

[API](https://skmtc.dev/caspr/apis/casper-api.md) - [All operations](https://skmtc.dev/caspr/apis/casper-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caspr/apis/casper-api/revisions/f9765e3aa00c?raw)
