Class BankAccount

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

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

    • 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 transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.

      For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.

    • 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.
    • 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.

    • 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 transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.

      For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.

    • 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>