Stripe.TaxID (stripity_stripe v2.17.3) View Source

You can add one or multiple tax IDs to a customer. A customer's tax IDs are displayed on invoices and credit notes issued for the customer.

See Stripe Tax IDs docs

Link to this section Summary

Functions

Creates a new TaxID object for a customer.

Deletes an existing TaxID object.

Returns a list of tax IDs for a customer.

Retrieves the TaxID object with the given identifier.

Link to this section Types

Specs

t() :: %Stripe.TaxID{
  country: String.t(),
  created: Stripe.timestamp(),
  customer: Stripe.id() | Stripe.Customer.t() | nil,
  deleted: boolean() | nil,
  id: Stripe.id(),
  livemode: boolean(),
  object: String.t(),
  type: String.t(),
  value: String.t(),
  verification: tax_info_verification() | nil
}

Specs

tax_id_data() :: %{type: String.t(), value: String.t()}
Link to this type

tax_info_verification()

View Source

Specs

tax_info_verification() :: %{
  status: String.t() | nil,
  verified_name: String.t() | nil,
  verified_address: String.t() | nil
}

Link to this section Functions

Link to this function

create(params, opts \\ [])

View Source

Specs

create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{customer: Stripe.id(), type: String.t(), value: String.t()} | %{}

Creates a new TaxID object for a customer.

Example

Stripe.TaxId.create(%{customer: "cus_FDVoXj36NmFrao", type: "eu_vat", value: "DE123456789"})

Stripe.TaxId.create(%{customer: %Stripe.Customer{id: "cus_FDVoXj36NmFrao"}, type: "eu_vat", value: "DE123456789"})

See Stripe docs

Link to this function

delete(id, params, opts \\ [])

View Source

Specs

delete(Stripe.id() | t(), map(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Deletes an existing TaxID object.

Example

Stripe.TaxId.delete("txi_123456789", %{customer: "cus_FDVoXj36NmFrao")})

Stripe.TaxId.delete("txi_123456789", %{customer: %Stripe.Customer{id: "cus_FDVoXj36NmFrao"}})

Stripe.TaxId.delete(%Stripe.TaxID{id: "txi_123456789"}, %{customer: "cus_FDVoXj36NmFrao"})

See Stripe docs

Link to this function

list(params, opts \\ [])

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
       :customer => Stripe.id() | Stripe.Customer.t(),
       optional(:ending_before) => t() | Stripe.id(),
       optional(:limit) => 1..100,
       optional(:starting_after) => t() | Stripe.id()
     }

Returns a list of tax IDs for a customer.

Example

Stripe.TaxId.list(%{customer: "cus_FDVoXj36NmFrao")})

See Stripe docs

Link to this function

retrieve(id, params, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), map(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieves the TaxID object with the given identifier.

Example

Stripe.TaxId.retrieve("txi_123456789", %{customer: "cus_FDVoXj36NmFrao")})

Stripe.TaxId.retrieve("txi_123456789", %{customer: %Stripe.Customer{id: "cus_FDVoXj36NmFrao"}})

See Stripe docs