Search documentation of stripe_elixir

# StripeElixir.Services.Tax.TransactionService (stripe_elixir v0.1.0)

Copy Markdown View Source

TaxProductResourceTaxTransaction

A Tax Transaction records the tax collected from or refunded to your customer.

Related guide: Calculate tax in your custom payment flow

## Summary

### Functions

create_from_calculation(client, params \\ %{}, opts \\ [])

Create a transaction from a calculation

create_reversal(client, params \\ %{}, opts \\ [])

Create a reversal transaction

retrieve(client, transaction, params \\ %{}, opts \\ [])

Retrieve a transaction

## Functions

# create_from_calculation(client, params \\ %{}, opts \\ [])

    @spec create_from_calculation(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Create a transaction from a calculation

Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.

# create_reversal(client, params \\ %{}, opts \\ [])

    @spec create_reversal(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Create a reversal transaction

Partially or fully reverses a previously created `Transaction`.

# retrieve(client, transaction, params \\ %{}, opts \\ [])

    @spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve a transaction

Retrieves a Tax `Transaction` object.