# createRate (https://developer.godaddy.com/en/docs/references/rest/taxes/rate/mutations/createRate)

***

title: createRate
description: "Create a new rate."
full: true
----------

mutation

Requires `commerce.tax:create`.

Create a new rate.

`value` is a union. Select `value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } }`. There is no `value { rate }` field. `metafields` and `references` are optional — omit them. If you send `metafields`, the array must be nonempty; `[]` is rejected. Prefer `type: "string"` (lowercase).

For `SimpleMoneyInput.value`, send `1999` for $19.99 USD, not `19.99`.

## Required headers

| Header       | Required | Description                                                                                                                     |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `x-store-id` | Yes      | ID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: `extensions.code: "UNAUTHENTICATED"`. |

Go to [Authentication](https://developer.godaddy.com/docs/api-users/auth) for credential setup.

## Arguments

* `input` `MutationCreateRateInput!` **required**
  * `label` `String!` **required** — A label for display.
  * `value` `RateValueInput!` **required** — The rate's value. Set `percentage` or `amount`, not both. For `amount.value` use integer minor units.
    * `amount` `SimpleMoneyInput` **optional** — The rate value represented as a fixed money amount. Required if `percentage` is not provided.
    * `percentage` `String` **optional** — The percentage applied by the rate, out of 100. Required if `amount` is not provided.
  * `calculationMethod` `RateCalculationMethodEnum` **optional** — The method to be used when applying the rate to a purchase amount.
  * `createdAt` `DateTime` **optional** — WARNING: DO NOT USE. Deprecated: This field is deprecated and only used for Tax v1 to v2 migration syncs.
  * `description` `String` **optional** — A human-friendly description.
  * `jurisdictionId` `ID` **optional** — The ID of the jurisdiction in which this rate applies.
  * `metafields` `[CreateMetafieldInput!]` **optional** — Any metafields to be created and assigned to the new rate.
    * `key` `String!` **required**
    * `namespace` `String!` **required**
    * `type` `String!` **required** — Metafield value type. Prefer lowercase values such as `string`. Catalog rejects uppercase `STRING`; Tax currently accepts both.
    * `value` `String!` **required**
  * `name` `String` **optional** — A unique human-friendly identifier. If omitted, a name will be generated from the `label` value.
  * `references` `[CreateReferenceInput!]` **optional** — Any references to be created and assigned to the new rate.
    * `origin` `String!` **required** — The origin of the reference.
    * `value` `String!` **required** — The value of the reference.
  * `status` `RateStatusEnum` **optional** — The desired status.
  * `updatedAt` `DateTime` **optional** — WARNING: DO NOT USE. Deprecated: This field is deprecated and only used for Tax v1 to v2 migration syncs.

## Possible returns

* `Rate` `Rate` — An individual tax rate.

- `activatedAt` `DateTime` **nullable** — The data & time at which the rate was first activated.
- `calculationMethod` `RateCalculationMethodEnum!` **non-null** — The method to be used when applying the rate to a purchase amount.
- `classifications` `RateClassificationsConnection` **nullable** — The classifications associated with the rate.
- `createdAt` `DateTime!` **non-null** — The data & time at which the rate was created.
- `description` `String` **nullable** — The human-friendly description.
- `id` `ID!` **non-null** — The globally-unique ID.
- `jurisdiction` `Jurisdiction` **nullable** — The jurisdiction in which this rate applies.
- `label` `String!` **non-null** — The label for display.
- `metafields` `RateMetafieldsConnection` **nullable**
- `name` `String!` **non-null** — The unique human-friendly identifier.
- `references` `RateReferencesConnection` **nullable** — A reference to the resource in an external service.
- `status` `RateStatusEnum!` **non-null** — The current status.
- `updatedAt` `DateTime!` **non-null** — The data & time at which the rate was last updated.
- `value` `RateValue!` **non-null** — The rate's value
