Stripe.Balance (stripity_stripe v2.17.3) View Source

Work with Stripe balance objects.

You can:

Link to this section Summary

Functions

List balance history

Retrieves the current account balance.

Retrieves a balance transaction

Link to this section Types

Specs

funds() :: %{
  currency: String.t(),
  amount: integer(),
  source_types: %{required(Stripe.Source.source_type()) => integer()}
}

Specs

issuing() :: %{available: [issuing_funds()]}

Specs

issuing_funds() :: %{currency: String.t(), amount: integer()}

Specs

t() :: %Stripe.Balance{
  available: [funds()],
  connect_reserved: [funds()] | nil,
  issuing: issuing(),
  livemode: boolean(),
  object: String.t(),
  pending: [funds()]
}

Link to this section Functions

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: %{
       optional(:available_on) => Stripe.date_query(),
       optional(:created) => Stripe.date_query(),
       optional(:currency) => String.t(),
       optional(:ending_before) => t() | Stripe.id(),
       optional(:limit) => 1..100,
       optional(:payout) => String.t(),
       optional(:source) => %{optional(:object) => String.t()},
       optional(:starting_after) => t() | Stripe.id(),
       optional(:type) => String.t()
     }

List balance history

See the Stripe docs.

Specs

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

Retrieves the current account balance.

This is based on the authentication that was used to make the request.

See the Stripe docs.

Link to this function

retrieve_transaction(id, opts \\ [])

View Source

Specs

retrieve_transaction(String.t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieves a balance transaction

See the Stripe docs.