View Source Stripe.BankAccount (stripity_stripe v3.3.1)

These bank accounts are payment methods on Customer objects.

On the other hand External Accounts are transfer destinations on Account objects for connected accounts. They can be bank accounts or debit cards as well, and are documented in the links above.

Related guide: Bank debits and transfers

Summary

Types

One or more documents that support the Bank account ownership verification requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check.

Documents that may be submitted to satisfy various informational requests.

t()

The bank_account type.

Functions

Delete a specified external account for a given account.

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

Verify a specified bank account for a given customer.

Types

Link to this type

bank_account_ownership_verification()

View Source
@type bank_account_ownership_verification() :: %{optional(:files) => [binary()]}

One or more documents that support the Bank account ownership verification requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check.

@type documents() :: %{
  optional(:bank_account_ownership_verification) =>
    bank_account_ownership_verification()
}

Documents that may be submitted to satisfy various informational requests.

@type t() :: %Stripe.BankAccount{
  account: (binary() | Stripe.Account.t()) | nil,
  account_holder_name: binary() | nil,
  account_holder_type: binary() | nil,
  account_type: binary() | nil,
  available_payout_methods: term() | nil,
  bank_name: binary() | nil,
  country: binary(),
  currency: binary(),
  customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil,
  default_for_currency: boolean() | nil,
  fingerprint: binary() | nil,
  future_requirements: term() | nil,
  id: binary(),
  last4: binary(),
  metadata: term() | nil,
  object: binary(),
  requirements: term() | nil,
  routing_number: binary() | nil,
  status: binary()
}

The bank_account type.

  • account The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an External Account where controller.is_controller is true.
  • account_holder_name The name of the person or business that owns the bank account.
  • account_holder_type The type of entity that holds the account. This can be either individual or company.
  • account_type The bank account type. This can only be checking or savings in most countries. In Japan, this can only be futsu or toza.
  • available_payout_methods A set of available payout methods for this bank account. Only values from this set should be passed as the method when creating a payout.
  • bank_name Name of the bank associated with the routing number (e.g., WELLS FARGO).
  • country Two-letter ISO code representing the country the bank account is located in.
  • currency Three-letter ISO code for the currency paid out to the bank account.
  • customer The ID of the customer that the bank account is associated with.
  • default_for_currency Whether this bank account is the default external account for its currency.
  • fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
  • future_requirements Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when.
  • id Unique identifier for the object.
  • last4 The last four digits of the bank account number.
  • metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • object String representing the object's type. Objects of the same type share the same value.
  • requirements Information about the requirements for the bank account, including what information needs to be collected.
  • routing_number The routing transit number for the bank account.
  • status For bank accounts, possible values are new, validated, verified, verification_failed, tokenized_account_number_deactivated or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If the status is tokenized_account_number_deactivated, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to errored and will not continue to send scheduled payouts until the bank details are updated.

For external accounts, possible values are new, errored, verification_failed, and tokenized_account_number_deactivated. If a payout fails, the status is set to errored and scheduled payouts are stopped until account details are updated. In the US and India, if we can't verify the owner of the bank account, we'll set the status to verification_failed. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.

Functions

Link to this function

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

View Source
@spec delete(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

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

View Source
@spec update(
  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(:documents) => documents(),
    optional(:exp_month) => binary(),
    optional(:exp_year) => binary(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary(),
    optional(:name) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.ExternalAccount.t()}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}

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

You can only update bank accounts when account.controller.requirement_collection is application, which includes Custom accounts.

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

#### Details * Method: `post` * Path: `/v1/accounts/{account}/external_accounts/{id}`

Link to this function

verify(customer, id, params \\ %{}, opts \\ [])

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

Verify a specified bank account for a given customer.

Details

  • Method: post
  • Path: /v1/customers/{customer}/sources/{id}/verify