Stripe.Services.CustomerBalanceTransactionService (tiger_stripe v0.1.10)

Copy Markdown View Source

CustomerBalanceTransaction

Each customer has a Balance value, which denotes a debit or credit that's automatically applied to their next invoice upon finalization. You may modify the value directly by using the update customer API, or by creating a Customer Balance Transaction, which increments or decrements the customer's balance by the specified amount.

Related guide: Customer balance

Summary

Functions

Create a customer balance transaction

List customer balance transactions

Update a customer credit balance transaction

Functions

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

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

Create a customer balance transaction

Creates an immutable transaction that updates the customer’s credit balance.

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

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

List customer balance transactions

Returns a list of transactions that updated the customer’s balances.

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

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

Retrieve a customer balance transaction

Retrieves a specific customer balance transaction that updated the customer’s balances.

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

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

Update a customer credit balance transaction

Most credit balance transaction fields are immutable, but you may update its description and metadata.