View Source Stripe.Tax.Transaction (stripity_stripe v3.2.0)
A Tax Transaction records the tax collected from or refunded to your customer.
Related guide: Calculate tax in your custom payment flow
Summary
Functions
Creates a Tax Transaction from a calculation.
Partially or fully reverses a previously created Transaction.
Retrieves the line items of a committed standalone transaction as a collection.
Retrieves a Tax Transaction object.
Types
The shipping cost to reverse.
@type t() :: %Stripe.Tax.Transaction{ created: integer(), currency: binary(), customer: binary() | nil, customer_details: term(), id: binary(), line_items: term() | nil, livemode: boolean(), metadata: term() | nil, object: binary(), reference: binary(), reversal: term() | nil, shipping_cost: term() | nil, tax_date: integer(), type: binary() }
The tax.transaction type.
createdTime at which the object was created. Measured in seconds since the Unix epoch.currencyThree-letter ISO currency code, in lowercase. Must be a supported currency.customerThe ID of an existing Customer used for the resource.customer_detailsidUnique identifier for the transaction.line_itemsThe tax collected or refunded, by line item.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadataSet 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.objectString representing the object's type. Objects of the same type share the same value.referenceA custom unique identifier, such as 'myOrder_123'.reversalIftype=reversal, contains information about what was reversed.shipping_costThe shipping cost details for the transaction.tax_dateTimestamp of date at which the tax rules and rates in effect applies for the calculation.typeIfreversal, this transaction reverses an earlier transaction.
Functions
@spec create_from_calculation( params :: %{ optional(:calculation) => binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:reference) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a Tax Transaction from a calculation.
Details
- Method:
post - Path:
/v1/tax/transactions/create_from_calculation
@spec create_reversal( params :: %{ optional(:expand) => [binary()], optional(:flat_amount) => integer(), optional(:line_items) => [line_items()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:mode) => :full | :partial, optional(:original_transaction) => binary(), optional(:reference) => binary(), optional(:shipping_cost) => shipping_cost() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Partially or fully reverses a previously created Transaction.
Details
- Method:
post - Path:
/v1/tax/transactions/create_reversal
@spec list_line_items( transaction :: binary(), params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(Stripe.Tax.TransactionLineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the line items of a committed standalone transaction as a collection.
Details
- Method:
get - Path:
/v1/tax/transactions/{transaction}/line_items
@spec retrieve( transaction :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves a Tax Transaction object.
Details
- Method:
get - Path:
/v1/tax/transactions/{transaction}