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

# Calculate Subscription Tax

`POST /api/v1/wallet/subscription/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/subscription/calculate-tax`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Calculate tax for a specific subscription plan and type based on country code.

## Request body

- SubscriptionTaxCalculationRequest: Request schema for calculating taxes for a subscription plan.
  - `country_code` string, required: ISO country code (e.g. IN, US)
  - `plan_name` string, required: Subscription plan name (e.g. free, plus, pro)
  - `plan_type` string, required: Plan type (e.g. monthly, yearly)

## 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)
