Stripe.Services.TopupService (tiger_stripe v0.1.10)

Copy Markdown View Source

Topup

To top up your Stripe balance, you create a top-up object. You can retrieve individual top-ups, as well as list all top-ups. Top-ups are identified by a unique, random ID.

Related guide: Topping up your platform account

Summary

Functions

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

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

Cancel a top-up

Cancels a top-up. Only pending top-ups can be canceled.

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

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

Create a top-up

Top up the balance of an account

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

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

List all top-ups

Returns a list of top-ups.

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

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

Retrieve a top-up

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

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

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

Update a top-up

Updates the metadata of a top-up. Other top-up details are not editable by design.