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

Attributes

  • idstring

    Unique identifier for the object.

  • account_holder_namenullable string

    The name of the person or business that owns the bank account.

  • account_holder_typenullable string

    The type of entity that holds the account. This can be either individual or company.

  • bank_namenullable string

    Name of the bank associated with the routing number (e.g., WELLS FARGO).

  • countrystring

    Two-letter ISO code representing the country the bank account is located in.

  • currencyenum

    Three-letter ISO code for the currency paid out to the bank account.

  • customernullable stringExpandable

    The ID of the customer that the bank account is associated with.

  • fingerprintnullable string

    Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.

  • last4string

    The last four digits of the bank account number.

  • metadatanullable object

    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.

  • routing_numbernullable string

    The routing transit number for the bank account.

More attributes

  • objectstring

  • accountnullable stringExpandable

  • account_typenullable string

  • available_payout_methodsnullable array of enums

  • statusstring

The Bank Account object
{
"id": "ba_1MvoIJ2eZvKYlo2CO9f0MabO",
"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": "cus_9s6XI9OFIdpjIg",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new"
}

When you create a new bank account, you must specify a Customer object on which to create it.

Parameters

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

Returns

Returns the bank account object.

POST /v1/customers/:id/sources
curl https://api.stripe.com/v1/customers/cus_9s6XI9OFIdpjIg/sources \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d source=btok_1MvoS32eZvKYlo2CDhGTErAe
Response
{
"id": "ba_1MvoIJ2eZvKYlo2CO9f0MabO",
"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": "cus_9s6XI9OFIdpjIg",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new"
}

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.

Parameters

  • account_holder_namestring

    The name of the person or business that owns the bank account.

  • account_holder_typestring

    The type of entity that holds the account. This can be either individual or company.

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

Returns

Returns the bank account object.

POST /v1/customers/:id/sources/:id
curl https://api.stripe.com/v1/customers/cus_9s6XI9OFIdpjIg/sources/ba_1MvoIJ2eZvKYlo2CO9f0MabO \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d "metadata[order_id]"=6735
Response
{
"id": "ba_1MvoIJ2eZvKYlo2CO9f0MabO",
"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": "cus_9s6XI9OFIdpjIg",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {
"order_id": "6735"
},
"routing_number": "110000000",
"status": "new"
}

By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.

Parameters

No parameters.

Returns

Returns the bank account object.

GET /v1/customers/:id/bank_accounts/:id
cURL
curl https://api.stripe.com/v1/customers/cus_9s6XI9OFIdpjIg/bank_accounts/ba_1MvoIJ2eZvKYlo2CO9f0MabO \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "ba_1MvoIJ2eZvKYlo2CO9f0MabO",
"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": "cus_9s6XI9OFIdpjIg",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new"
}