Create a bank account

When you create a new bank account, you must specify a connected account to create it on. You can only specify connected accounts where account.controller.requirement_collection is application (includes Custom accounts).

If the bank account’s owner has no other external account in the bank account’s currency, the new bank account will become the default for that currency. However, if the owner already has a bank account for that currency, the new account will become the default only if the default_for_currency parameter is set to true.

Parameters

  • external_accountobject | stringRequired

    Either a token, like the ones returned by Stripe.js, or a dictionary containing a user’s bank account details (with the options shown below).

  • metadataobject

    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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

More parameters

  • default_for_currencyboolean

Returns

Returns the bank account object

POST /v1/accounts/:id/external_accounts
curl https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d external_account=btok_1NAiJy2eZvKYlo2Cnh6bIs9c
Response
{
"id": "ba_1NAiJy2eZvKYlo2CvChQKz5k",
"object": "bank_account",
"account": "acct_1032D82eZvKYlo2C",
"account_holder_name": "Jane Austen",
"account_holder_type": "company",
"account_type": null,
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new"
}

Update a bank account

Updates the metadata, account holder name, account holder type of a bank account belonging to a 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 any arguments or changes.

Parameters

  • default_for_currencyboolean

    When set to true, this becomes the default external account for its currency.

  • metadataobject

    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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

More parameters

  • account_holder_namestring

  • account_holder_typestring

  • account_typestring

  • documentsobject

Returns

Returns the bank account object.

POST /v1/accounts/:id/external_accounts/:id
curl https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts/ba_1NAiwl2eZvKYlo2CRdCLZSxO \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d "metadata[order_id]"=6735
Response
{
"id": "ba_1NAiwl2eZvKYlo2CRdCLZSxO",
"object": "bank_account",
"account_holder_name": "Jane Austen",
"account_holder_type": "company",
"account_type": null,
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {
"order_id": "6735"
},
"routing_number": "110000000",
"status": "new",
"account": "acct_1032D82eZvKYlo2C"
}

Retrieve a bank account

By default, you can see the 10 most recent external accounts stored on a (connected account)[/docs/connect/accounts] directly on the object. You can also retrieve details about a specific bank account stored on the account.

Parameters

No parameters.

Returns

Returns the bank account object.

GET /v1/accounts/:id/external_accounts/:id
curl https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts/ba_1NAinX2eZvKYlo2CpFGcuuEG \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "ba_1NAinX2eZvKYlo2CpFGcuuEG",
"object": "bank_account",
"account_holder_name": "Jane Austen",
"account_holder_type": "company",
"account_type": null,
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"customer": null,
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new"
}

List all bank accounts

You can see a list of the bank accounts that belong to a connected account. Note that the 10 most recent external accounts are always available by default on the corresponding Stripe object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.

Parameters

No parameters.

More parameters

  • ending_beforestring

  • limitinteger

  • objectstring

  • starting_afterstring

Returns

Returns a list of the bank accounts stored on the account.

GET /v1/accounts/:id/external_accounts
curl -G https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d object=bank_account
Response
{
"object": "list",
"url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts",
"has_more": false,
"data": [
{
"id": "ba_1NB1IV2eZvKYlo2CByiLrMWv",
"object": "bank_account",
"account_holder_name": "Jane Austen",
"account_holder_type": "company",
"account_type": null,
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new",
"account": "acct_1032D82eZvKYlo2C"
}
{...}
{...}
],
}

Delete a bank account

You can delete destination bank accounts from a connected account where account.controller.requirement_collection is application (includes Custom accounts).

There are restrictions for deleting a bank account with default_for_currency set to true. You cannot delete a bank account if any of the following apply:

  • The bank account’s currency is the same as the connected account’s default_currency.
  • There is another external account (card or bank account) with the same currency as the bank account.

To delete a bank account, you must first replace the default external account by setting default_for_currency with another external account in the same currency.

Parameters

No parameters.

Returns

Returns the deleted bank account object.

DELETE /v1/accounts/:id/external_accounts/:id
curl -X DELETE https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts/ba_1NAz2w2eZvKYlo2CgeR2w6yU \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "ba_1NAz2w2eZvKYlo2CgeR2w6yU",
"object": "bank_account",
"deleted": true
}
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$