Sample - Stripe API
POST/v1/external_accounts/{id}

Update a bank account

Updates editable details of a bank account belonging to a connected account. Use fields such as account_holder_name, account_holder_type, metadata, or default_for_currency; updates are available only when the connected account uses application requirement collection, and an empty update can re-enable a disabled bank account.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 16 body fields
idstringrequired
The identifier of the external bank account to update.

Optional fields for updating an external bank account or card.

account_holder_namestringoptional
The name of the person or business that owns the bank account.
account_holder_typestringoptional
The type of entity that holds the account. This can be either `individual` or `company`.
Allowed:companyindividual
account_typestringoptional
The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
Allowed:checkingfutsusavingstoza
address_citystringoptional
City/District/Suburb/Town/Village.
address_countrystringoptional
Billing address country, if provided when creating card.
address_line1stringoptional
Address line 1 (Street address/PO Box/Company name).
address_line2stringoptional
Address line 2 (Apartment/Suite/Unit/Building).
address_statestringoptional
State/County/Province/Region.
address_zipstringoptional
ZIP or postal code.
default_for_currencybooleanoptional
When set to true, this becomes the default external account for its currency.
documentsobjectoptional
Documents that may be submitted to satisfy various informational requests.
exp_monthstringoptional
Two digit number representing the card’s expiration month.
exp_yearstringoptional
Four digit number representing the card’s expiration year.
expandarray<string>optional
Specifies which fields in the response should be expanded.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
namestringoptional
Cardholder name.

2 status codes
200Returns the updated external account, which can be a bank account or card, including its identifier, currency, last four digits, status, and object type.
accountstringoptional
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](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
account_holder_namestringoptional
The name of the person or business that owns the bank account.
account_holder_typestringoptional
The type of entity that holds the account. This can be either `individual` or `company`.
account_typestringoptional
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_methodsarray<string>optional
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_namestringoptional
Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
countrystringrequired
Two-letter ISO code representing the country the bank account is located in.
currencystringrequired
Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
customerstringoptional
The ID of the customer that the bank account is associated with.
default_for_currencybooleanoptional
Whether this bank account is the default external account for its currency.
fingerprintstringoptional
Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
future_requirementsobjectoptional
Information about the [upcoming new requirements for the bank account](https://docs.stripe.com/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
idstringrequired
Unique identifier for the object.
last4stringrequired
The last four digits of the bank account number.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:bank_account
requirementsobjectoptional
Information about the requirements for the bank account, including what information needs to be collected.
routing_numberstringoptional
The routing transit number for the bank account.
statusstringrequired
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](https://stripe.com/docs/payouts#payout-schedule) 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](https://support.stripe.com/questions/bank-account-ownership-verification), 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.
defaultReturned when the API cannot process the update; the response contains an error object.
errorobjectrequired

Error handling

id must identify the bank account to update, and the connected account must use application requirement collection. account_holder_type must be individual, company, or an empty string, while account_type must be checking, savings, futsu, or toza; metadata must be string-valued key-value data or an empty string.