View Source Stripe.TaxRate (Striped v0.4.0)
Tax rates can be applied to invoices, subscriptions and Checkout Sessions to collect tax.
Related guide: Tax Rates.
Link to this section Summary
Functions
Creates a new tax rate.
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
Retrieves a tax rate with the given ID
Updates an existing tax rate.
Link to this section Types
@type t() :: %Stripe.TaxRate{ active: boolean(), country: binary() | nil, created: integer(), description: binary() | nil, display_name: binary(), id: binary(), inclusive: boolean(), jurisdiction: binary() | nil, livemode: boolean(), metadata: term() | nil, object: binary(), percentage: term(), state: binary() | nil, tax_type: binary() | nil }
The tax_rate
type.
active
Defaults totrue
. When set tofalse
, 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.country
Two-letter country code (ISO 3166-1 alpha-2).created
Time at which the object was created. Measured in seconds since the Unix epoch.description
An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.display_name
The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.id
Unique identifier for the object.inclusive
This specifies if the tax rate is inclusive or exclusive.jurisdiction
The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.livemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.metadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.object
String representing the object's type. Objects of the same type share the same value.percentage
This represents the tax rate percent out of 100.state
ISO 3166-2 subdivision code, without country prefix. For example, "NY" for New York, United States.tax_type
The high-level tax type, such asvat
orsales_tax
.
Link to this section Functions
@spec create( client :: Stripe.t(), params :: %{ optional(:active) => boolean(), optional(:country) => binary(), optional(:description) => binary(), optional(:display_name) => binary(), optional(:expand) => [binary()], optional(:inclusive) => boolean(), optional(:jurisdiction) => binary(), optional(:metadata) => %{optional(binary()) => binary()}, optional(:percentage) => number(), optional(:state) => binary(), optional(:tax_type) => :gst | :hst | :jct | :pst | :qst | :rst | :sales_tax | :vat }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a new tax rate.
Details
- Method:
post
- Path:
/v1/tax_rates
@spec list( client :: Stripe.t(), params :: %{ optional(:active) => boolean(), optional(:created) => created() | integer(), optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:inclusive) => boolean(), optional(:limit) => integer(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
Details
- Method:
get
- Path:
/v1/tax_rates
@spec retrieve( client :: Stripe.t(), tax_rate :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves a tax rate with the given ID
Details
- Method:
get
- Path:
/v1/tax_rates/{tax_rate}
@spec update( client :: Stripe.t(), tax_rate :: binary(), params :: %{ optional(:active) => boolean(), optional(:country) => binary(), optional(:description) => binary(), optional(:display_name) => binary(), optional(:expand) => [binary()], optional(:jurisdiction) => binary(), optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:state) => binary(), optional(:tax_type) => :gst | :hst | :jct | :pst | :qst | :rst | :sales_tax | :vat }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates an existing tax rate.
Details
- Method:
post
- Path:
/v1/tax_rates/{tax_rate}