Creates a single-use token that represents a bank account’s details. You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a connected account where controller.requirement_collection is application
, which includes Custom accounts.
Parameters
- bank_
accountobject The bank account this token will represent.
- bank_account.
account_ numberstringRequired The account number for the bank account, in string form. Must be a checking account.
- bank_account.
countrystringRequired The country in which the bank account is located.
- bank_account.
account_ holder_ namestring The name of the person or business that owns the bank account. This field is required when attaching the bank account to a
Customer
object. - bank_account.
account_ holder_ typestring The type of entity that holds the account. It can be
company
orindividual
. This field is required when attaching the bank account to aCustomer
object. - bank_account.
account_ typestring The bank account type. This can only be
checking
orsavings
in most countries. In Japan, this can only befutsu
ortoza
. - bank_account.
currencyenum The currency the bank account is in. This must be a country/currency pairing that Stripe supports.
- bank_account.
payment_ methodstring The ID of a Payment Method with a
type
ofus_
. The Payment Method’s bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in thebank_ account bank_
hash. You must include the top-levelaccount customer
parameter if the Payment Method is attached to aCustomer
object. If the Payment Method is not attached to aCustomer
object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent withattach_
.to_ self=true - bank_account.
routing_ numberstring The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for
account_
, this field is not required.number
More parameters
- customerstringConnect only
Create a token for the customer, which is owned by the application’s account. You can only use this with an OAuth access token or Stripe-Account header. Learn more about cloning saved payment methods.
Returns
Returns the created bank account token if it’s successful. Otherwise, this call raises an error.
{ "id": "tok_1N3T00LkdIwHu7ixt44h1F8k", "object": "token", "bank_account": { "id": "ba_1NWScr2eZvKYlo2C8MgV5Cwn", "object": "bank_account", "account_holder_name": "Jenny Rosen", "account_holder_type": "individual", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "fingerprint": "1JWtPxqbdX5Gamtz", "last4": "6789", "routing_number": "110000000", "status": "new" }, "client_ip": null, "created": 1689981645, "livemode": false, "redaction": null, "type": "bank_account", "used": false}