# `Stripe.Services.CustomerBalanceTransactionService`
[🔗](https://github.com/jeffhuen/tiger_stripe/blob/main/lib/stripe/services/customer_balance_transaction_service.ex#L2)

CustomerBalanceTransaction

Each customer has a [Balance](https://docs.stripe.com/api/customers/object#customer_object-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](https://docs.stripe.com/api/customers/update),
or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.

Related guide: [Customer balance](https://docs.stripe.com/billing/customer/balance)

# `create`

```elixir
@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](https://docs.stripe.com/docs/billing/customer/balance).

# `list`

```elixir
@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](https://docs.stripe.com/docs/billing/customer/balance).

# `retrieve`

```elixir
@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](https://docs.stripe.com/docs/billing/customer/balance).

# `update`

```elixir
@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`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
