Stripe: List all bank accounts
Stripe customers.getCustomersCustomerBankAccounts: arguments, response, policy and SDK examples.
← Customers operations · Get started
Operation stripe.getcustomerscustomerbankaccounts
Provider route: GET /v1/customers/{customer}/bank_accounts. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["customers"]["getCustomersCustomerBankAccounts"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.customers.getCustomersCustomerBankAccounts(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_stripe import StripeIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.customers.get_customers_customer_bank_accounts(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.customer | string | Required within parent | Maximum length: 5000 |
query | object | Optional | Additional keys: not allowed |
query.ending_before | string | Optional | |
query.expand | array | Optional | |
query.expand[] | string | Each item | Maximum length: 5000 |
query.limit | integer | Optional | |
query.starting_after | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | Details about each object. |
data[] | Model | Each item | Expand Retrieve a bank account — response body |
has_more | boolean | Required within parent | True if this list has another page of items after this one that can be fetched. |
object | string | Required within parent | String representing the object’s type. Objects of the same type share the same value. Always has the value `list`. Known values: list |
url | string | Required within parent | The URL where this list can be accessed. Maximum length: 5000 |
Referenced models: Retrieve a bank account — response body
Schemas
Section titled “Schemas”704 more schemas are linked from the tables above, on the schema pages.
Retrieve a bank account — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | These bank accounts are payment methods on `Customer` objects. On the other hand [External Accounts](/api#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](/payments/bank-debits-transfers) |
account | JSON | Optional | |
account (anyOf 1) | JSON | Alternative | 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 (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
account (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create an account — response body |
account (anyOf 2) | null | Alternative | |
account_holder_name | JSON | Optional | |
account_holder_name (anyOf 1) | string | Alternative | The name of the person or business that owns the bank account. Maximum length: 5000 |
account_holder_name (anyOf 2) | null | Alternative | |
account_holder_type | JSON | Optional | |
account_holder_type (anyOf 1) | string | Alternative | The type of entity that holds the account. This can be either `individual` or `company`. Maximum length: 5000 |
account_holder_type (anyOf 2) | null | Alternative | |
account_type | JSON | Optional | |
account_type (anyOf 1) | string | Alternative | The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. Maximum length: 5000 |
account_type (anyOf 2) | null | Alternative | |
available_payout_methods | JSON | Optional | |
available_payout_methods (anyOf 1) | array | Alternative | 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. |
available_payout_methods (anyOf 1)[] | string | Each item | Known values: instant, standard |
available_payout_methods (anyOf 2) | null | Alternative | |
bank_name | JSON | Optional | |
bank_name (anyOf 1) | string | Alternative | Name of the bank associated with the routing number (e.g., `WELLS FARGO`). Maximum length: 5000 |
bank_name (anyOf 2) | null | Alternative | |
country | string | Required within parent | Two-letter ISO code representing the country the bank account is located in. Maximum length: 5000 |
currency | string | Required within parent | Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. Format: currency |
customer | JSON | Optional | |
customer (anyOf 1) | JSON | Alternative | The ID of the customer that the bank account is associated with. |
customer (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 1) (anyOf 3) | Model | Alternative | Expand Delete a customer — response body |
customer (anyOf 2) | null | Alternative | |
default_for_currency | JSON | Optional | |
default_for_currency (anyOf 1) | boolean | Alternative | Whether this bank account is the default external account for its currency. |
default_for_currency (anyOf 2) | null | Alternative | |
fingerprint | JSON | Optional | |
fingerprint (anyOf 1) | string | Alternative | Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. Maximum length: 5000 |
fingerprint (anyOf 2) | null | Alternative | |
future_requirements | JSON | Optional | |
future_requirements (anyOf 1) | JSON | Alternative | 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. |
future_requirements (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification |
future_requirements (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
last4 | string | Required within parent | The last four digits of the bank account number. Maximum length: 5000 |
metadata | JSON | Optional | |
metadata (anyOf 1) | object | Alternative | 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. Additional keys: see wildcard field |
metadata (anyOf 1).* | string | Additional keys | Maximum length: 500 |
metadata (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: bank_account |
requirements | JSON | Optional | |
requirements (anyOf 1) | JSON | Alternative | Information about the requirements for the bank account, including what information needs to be collected. |
requirements (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification |
requirements (anyOf 2) | null | Alternative | |
routing_number | JSON | Optional | |
routing_number (anyOf 1) | string | Alternative | The routing transit number for the bank account. Maximum length: 5000 |
routing_number (anyOf 2) | null | Alternative | |
status | string | Required within parent | 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. Maximum length: 5000 |
Referenced models: Create an account — response body, Create a customer — response body, Delete a customer — response body, Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification
Delete a customer — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: customer |
Create an account — response body — groups The groups associated with the account payments pricing
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
payments_pricing | JSON | Optional | |
payments_pricing (anyOf 1) | string | Alternative | The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://docs.stripe.com/connect/platform-pricing-tools) for details. Maximum length: 5000 |
payments_pricing (anyOf 2) | null | Alternative |
Create an account — response body — tos acceptance
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
date | JSON | Optional | |
date (anyOf 1) | JSON | Alternative | |
date (anyOf 1) (anyOf 1) | integer | Alternative | The Unix timestamp marking when the account representative accepted their service agreement Format: unix-time |
date (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
date (anyOf 2) | null | Alternative | |
ip | JSON | Optional | |
ip (anyOf 1) | string | Alternative | The IP address from which the account representative accepted their service agreement Maximum length: 5000 |
ip (anyOf 2) | null | Alternative | |
service_agreement | string | Optional | The user's service agreement type Maximum length: 5000 |
user_agent | JSON | Optional | |
user_agent (anyOf 1) | string | Alternative | The user agent of the browser from which the account representative accepted their service agreement Maximum length: 5000 |
user_agent (anyOf 2) | null | Alternative |
Create a Payment Method — response body — zip
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.getcustomerscustomerbankaccounts. Catalog operation: GetCustomersCustomerBankAccounts. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Stripe-Version": "2026-09-30.endive"}