stripe/stripe-node — pull request #131 by tarek-salah (2014-11-28 13:03:25+00:00)
Title: support bank accounts for customers

# Bank Account Support

I added REST support to bank accounts (get - insert - update -delete - list) , I hope that will help you
### Limitations
No dashboard support

### Attaching a bank account to a customer
To add a bank account to a customer
* `createBankAccount(customerId[, params])`
```javascript
stripe.customers.createBankAccount(
"cus_5D7IPlJT8zdRRB",
{bank_account: "btok_5BfEOlbZKtRNsV"},
function(err, bankAccount) {
// asynchronously called
}
);
```

### Listing bank accounts
* `listBankAccounts(customerId)`
```javascript
stripe.customers.listBankAccounts('cu_152h3hFXmyZLePgCPeA4K6Wj', function(err, bankAccounts) {
// asynchronously called
});
```

### Retrieve a bank account
* `retrieveBankAccount(customerId, bankAccountId)`
```javascript
stripe.customers.retrieveBankAccount(
"cus_5D7IPlJT8zdRRB",
"ba_151HuGFXmyZLePgCCAoehVFB",
function(err, bankAccount) {
// asynchronously called
}
);
```

### Updating a bank account
The only thing that can be updated on a bank account is the metadata. If you would like to change the account/routing information, you must create a new bank account (and delete the old one if you'd like).
* `updateBankAccount(customerId, bankAccountId[, params])`
```javascript
stripe.customers.updateBankAccount(
"cus_5D7IPlJT8zdRRB",
"ba_151HuGFXmyZLePgCCAoehVFB",
{ metadata: {"email":"email@test.com"} },
function(err, bankAccount) {
// asynchronously called
}
);
```

### Delete a bank account
* `deleteBankAccount(customerId, bankAccountId)`
```javascript
stripe.customers.deleteBankAccount(
"cus_5D7IPlJT8zdRRB",
"ba_151HuGFXmyZLePgCCAoehVFB",
function(err, confirmation) {
// asynchronously called
}
);
```