View Source Stripe.ExternalAccount (Striped v0.4.0)

Link to this section Summary

Types

t()

The external_account type.

Functions

Create an external account for a given account.

Delete a specified external account for a given account.

List external accounts for an account.

Retrieve a specified external account for a given account.

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

Link to this section Types

@type t() :: %Stripe.ExternalAccount{}

The external_account type.

Link to this section Functions

Link to this function

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

View Source
@spec create(
  client :: Stripe.t(),
  account :: binary(),
  params :: %{
    optional(:default_for_currency) => boolean(),
    optional(:expand) => [binary()],
    optional(:external_account) => binary(),
    optional(:metadata) => %{optional(binary()) => binary()}
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Create an external account for a given account.

Details

  • Method: post
  • Path: /v1/accounts/{account}/external_accounts
Link to this function

delete(client, account, id, opts \\ [])

View Source
@spec delete(
  client :: Stripe.t(),
  account :: binary(),
  id :: binary(),
  opts :: Keyword.t()
) ::
  {:ok, Stripe.DeletedExternalAccount.t()}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}

Delete a specified external account for a given account.

Details

  • Method: delete
  • Path: /v1/accounts/{account}/external_accounts/{id}
Link to this function

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

View Source
@spec list(
  client :: Stripe.t(),
  account :: binary(),
  params :: %{
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

List external accounts for an account.

Details

  • Method: get
  • Path: /v1/accounts/{account}/external_accounts
Link to this function

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

View Source
@spec retrieve(
  client :: Stripe.t(),
  account :: binary(),
  id :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieve a specified external account for a given account.

Details

  • Method: get
  • Path: /v1/accounts/{account}/external_accounts/{id}
Link to this function

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

View Source
@spec update(
  client :: Stripe.t(),
  account :: binary(),
  id :: binary(),
  params :: %{
    optional(:account_holder_name) => binary(),
    optional(:account_holder_type) => :company | :individual,
    optional(:account_type) => :checking | :futsu | :savings | :toza,
    optional(:address_city) => binary(),
    optional(:address_country) => binary(),
    optional(:address_line1) => binary(),
    optional(:address_line2) => binary(),
    optional(:address_state) => binary(),
    optional(:address_zip) => binary(),
    optional(:default_for_currency) => boolean(),
    optional(:exp_month) => binary(),
    optional(:exp_year) => binary(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary(),
    optional(:name) => binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

Details

  • Method: post
  • Path: /v1/accounts/{account}/external_accounts/{id}