Class BankAccount

All Implemented Interfaces:
ExternalAccount, HasId, MetadataStore<BankAccount>, PaymentSource, StripeActiveObject, StripeObjectInterface

public class BankAccount extends ApiResource implements MetadataStore<BankAccount>, ExternalAccount, PaymentSource
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

  • Constructor Details

    • BankAccount

      public BankAccount()
  • Method Details

    • getAccount

      public String getAccount()
      Get ID of expandable account object.
    • setAccount

      public void setAccount(String id)
    • getAccountObject

      public Account getAccountObject()
      Get expanded account.
    • setAccountObject

      public void setAccountObject(Account expandableObject)
    • getCustomer

      public String getCustomer()
      Get ID of expandable customer object.
    • setCustomer

      public void setCustomer(String id)
    • getCustomerObject

      public Customer getCustomerObject()
      Get expanded customer.
    • setCustomerObject

      public void setCustomerObject(Customer expandableObject)
    • verify

      public BankAccount verify() throws StripeException
      Verify a specified bank account for a given customer.
      Throws:
      StripeException
    • verify

      public BankAccount verify(RequestOptions options) throws StripeException
      Verify a specified bank account for a given customer.
      Throws:
      StripeException
    • verify

      public BankAccount verify(Map<String,Object> params) throws StripeException
      Verify a specified bank account for a given customer.
      Throws:
      StripeException
    • verify

      public BankAccount verify(Map<String,Object> params, RequestOptions options) throws StripeException
      Verify a specified bank account for a given customer.
      Throws:
      StripeException
    • verify

      public BankAccount verify(BankAccountVerifyParams params) throws StripeException
      Verify a specified bank account for a given customer.
      Throws:
      StripeException
    • verify

      public BankAccount verify(BankAccountVerifyParams params, RequestOptions options) throws StripeException
      Verify a specified bank account for a given customer.
      Throws:
      StripeException
    • update

      public BankAccount update(Map<String,Object> params) throws StripeException
      Updates the metadata, account holder name, and 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.

      Updates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.

      Specified by:
      update in interface ExternalAccount
      Specified by:
      update in interface MetadataStore<BankAccount>
      Throws:
      StripeException
    • update

      public BankAccount update(Map<String,Object> params, RequestOptions options) throws StripeException
      Updates the metadata, account holder name, and 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.

      Updates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.

      Specified by:
      update in interface ExternalAccount
      Specified by:
      update in interface MetadataStore<BankAccount>
      Throws:
      StripeException
    • update

      Updates the metadata, account holder name, and 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.

      Updates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.

      Throws:
      StripeException
    • update

      Updates the metadata, account holder name, and 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.

      Updates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.

      Throws:
      StripeException
    • update

      Updates the metadata, account holder name, and 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.

      Updates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.

      Throws:
      StripeException
    • update

      Updates the metadata, account holder name, and 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.

      Updates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.

      Throws:
      StripeException
    • delete

      public BankAccount delete() throws StripeException
      Delete a specified external account for a given account.

      Delete a specified source for a given customer.

      Specified by:
      delete in interface ExternalAccount
      Throws:
      StripeException
    • delete

      public BankAccount delete(RequestOptions options) throws StripeException
      Delete a specified external account for a given account.

      Delete a specified source for a given customer.

      Specified by:
      delete in interface ExternalAccount
      Throws:
      StripeException
    • delete

      public BankAccount delete(Map<String,Object> params) throws StripeException
      Delete a specified external account for a given account.

      Delete a specified source for a given customer.

      Specified by:
      delete in interface ExternalAccount
      Throws:
      StripeException
    • delete

      public BankAccount delete(Map<String,Object> params, RequestOptions options) throws StripeException
      Delete a specified external account for a given account.

      Delete a specified source for a given customer.

      Specified by:
      delete in interface ExternalAccount
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAccountHolderName

      public String getAccountHolderName()
      The name of the person or business that owns the bank account.
    • getAccountHolderType

      public String getAccountHolderType()
      The type of entity that holds the account. This can be either individual or company.
    • getAccountType

      public String getAccountType()
      The bank account type. This can only be checking or savings in most countries. In Japan, this can only be futsu or toza.
    • getAvailablePayoutMethods

      public List<String> getAvailablePayoutMethods()
      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.
    • getBankName

      public String getBankName()
      Name of the bank associated with the routing number (e.g., WELLS FARGO).
    • getCountry

      public String getCountry()
      Two-letter ISO code representing the country the bank account is located in.
    • getCurrency

      public String getCurrency()
      Three-letter ISO code for the currency paid out to the bank account.
    • getDefaultForCurrency

      public Boolean getDefaultForCurrency()
      Whether this bank account is the default external account for its currency.
    • getDeleted

      public Boolean getDeleted()
      Always true for a deleted object.
    • getFingerprint

      public String getFingerprint()
      Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
    • getFutureRequirements

      public BankAccount.FutureRequirements getFutureRequirements()
      Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when.
    • getLast4

      public String getLast4()
      The last four digits of the bank account number.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to bank_account.

    • getRequirements

      public BankAccount.Requirements getRequirements()
      Information about the requirements for the bank account, including what information needs to be collected.
    • getRoutingNumber

      public String getRoutingNumber()
      The routing transit number for the bank account.
    • getStatus

      public String getStatus()
      For bank accounts, possible values are new, validated, verified, verification_failed, 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 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 and verification_failed. 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.

    • setAccountHolderName

      public void setAccountHolderName(String accountHolderName)
      The name of the person or business that owns the bank account.
    • setAccountHolderType

      public void setAccountHolderType(String accountHolderType)
      The type of entity that holds the account. This can be either individual or company.
    • setAccountType

      public void setAccountType(String accountType)
      The bank account type. This can only be checking or savings in most countries. In Japan, this can only be futsu or toza.
    • setAvailablePayoutMethods

      public void setAvailablePayoutMethods(List<String> availablePayoutMethods)
      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.
    • setBankName

      public void setBankName(String bankName)
      Name of the bank associated with the routing number (e.g., WELLS FARGO).
    • setCountry

      public void setCountry(String country)
      Two-letter ISO code representing the country the bank account is located in.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO code for the currency paid out to the bank account.
    • setDefaultForCurrency

      public void setDefaultForCurrency(Boolean defaultForCurrency)
      Whether this bank account is the default external account for its currency.
    • setDeleted

      public void setDeleted(Boolean deleted)
      Always true for a deleted object.
    • setFingerprint

      public void setFingerprint(String fingerprint)
      Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
    • setFutureRequirements

      public void setFutureRequirements(BankAccount.FutureRequirements futureRequirements)
      Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLast4

      public void setLast4(String last4)
      The last four digits of the bank account number.
    • setMetadata

      public void setMetadata(Map<String,String> 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.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to bank_account.

    • setRequirements

      public void setRequirements(BankAccount.Requirements requirements)
      Information about the requirements for the bank account, including what information needs to be collected.
    • setRoutingNumber

      public void setRoutingNumber(String routingNumber)
      The routing transit number for the bank account.
    • setStatus

      public void setStatus(String status)
      For bank accounts, possible values are new, validated, verified, verification_failed, 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 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 and verification_failed. 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.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId
    • getMetadata

      public Map<String,String> getMetadata()
      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.
      Specified by:
      getMetadata in interface MetadataStore<BankAccount>