# PostTaxRates

From **Stripe API**.

`POST /v1/tax_rates`

<p>Creates a new tax rate.</p>

## Request body

- Required: true
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"properties":{"active":{"description":"Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.","type":"boolean"},"country":{"description":"Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).","maxLength":5000,"type":"string"},"description":{"description":"An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.","maxLength":5000,"type":"string"},"display_name":{"description":"The display name of the tax rate, which will be shown to users.","maxLength":50,"type":"string"},"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"},"inclusive":{"description":"This specifies if the tax rate is inclusive or exclusive.","type":"boolean"},"jurisdiction":{"description":"The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.","maxLength":50,"type":"string"},"metadata":{"additionalProperties":{"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.","type":"object"},"percentage":{"description":"This represents the tax rate percent out of 100.","type":"number"},"state":{"description":"[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.","maxLength":2,"type":"string"},"tax_type":{"description":"The high-level tax type, such as `vat` or `sales_tax`.","enum":["gst","hst","jct","pst","qst","rst","sales_tax","vat"],"type":"string"}},"required":["display_name","inclusive","percentage"],"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.

Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).

```json
{"description":"Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).","properties":{"active":{"description":"Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.","type":"boolean"},"country":{"description":"Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).","maxLength":5000,"nullable":true,"type":"string"},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"description":{"description":"An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.","maxLength":5000,"nullable":true,"type":"string"},"display_name":{"description":"The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.","maxLength":5000,"type":"string"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"inclusive":{"description":"This specifies if the tax rate is inclusive or exclusive.","type":"boolean"},"jurisdiction":{"description":"The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.","maxLength":5000,"nullable":true,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.","nullable":true,"type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["tax_rate"],"type":"string"},"percentage":{"description":"This represents the tax rate percent out of 100.","type":"number"},"state":{"description":"[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States.","maxLength":5000,"nullable":true,"type":"string"},"tax_type":{"description":"The high-level tax type, such as `vat` or `sales_tax`.","enum":["gst","hst","jct","pst","qst","rst","sales_tax","vat"],"nullable":true,"type":"string"}},"required":["active","created","display_name","id","inclusive","livemode","object","percentage"],"title":"TaxRate","type":"object","x-expandableFields":[],"x-resourceId":"tax_rate"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url https://api.stripe.com/v1/tax_rates \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "active": true,
  "country": "string",
  "description": "string",
  "display_name": "string",
  "expand": [
    "string"
  ],
  "inclusive": true,
  "jurisdiction": "string",
  "metadata": {},
  "percentage": 1,
  "state": "string",
  "tax_type": "string"
}'
```
