How to add bank account to satisfy "fields needed" on managed users (nodejs)

1,025 views
Skip to first unread message

Nathan Stowell

unread,
Apr 8, 2015, 6:02:29 PM4/8/15
to api-d...@lists.stripe.com
Hello everyone,

I am in the process of building out a server side backend to a mobile app that is utilizing stripe connect and "managed" users.  When a user signs up through the app, a new record is created on my db and then that is passed up to stripe via the "stripe.accounts.create" function in the nodejs stripe api. That part all works great.

Subsequent requests to see that users account, reveals a "fields needed" node in the returned json.  In that I am seeing the only field as "bank account".  When trying to fire a "stripe.accounts.update" function (passing in the users stripeId of course) with what I think the correct json is I keep getting a rejection error from stripe stating "invalid string".

My JSON is valid, I just don't know what stripe is expecting.  Has anybody tried this and can point me in the right direction?  Below is the small snippit of code that I am using:

          stripe.accounts.update(stripeid,
          {
            bank_account:
            {
              routing_number: body.routingNumber,
              account_number: body.accountNumber,
              last4: body.ssn,
              bank_name: body.name,
            },
          });


Thank you so much in advance for any help you can offer!

Brian Krausz

unread,
Apr 8, 2015, 8:52:44 PM4/8/15
to api-d...@lists.stripe.com
Hi Nathan,

Sorry for the super vague error message there: we'll change that to something more helpful.

The fields you need to provide to update the bank_account are routing_number, account_number, country, and currency. They're described at https://stripe.com/docs/api#update_account if you expand the "bank_account" section. The last4 and bank_name are returned by us in the response, you will never set them.

Thanks,
Brian

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Nathan Stowell

unread,
Apr 8, 2015, 10:22:48 PM4/8/15
to api-d...@lists.stripe.com
Hey Brian, 

Thanks so much for your help! That got me going.  Yeah it is weird b/c in most cases the errors are pretty helpful. Anyway for anyone else coming in and reading this you will need to use specific fake bank accounts in order to test this.  You can find the info here: https://stripe.com/docs/testing
Message has been deleted

Mark Berry

unread,
Jun 1, 2015, 6:51:56 PM6/1/15
to api-d...@lists.stripe.com
Help Stripe! Thanks in advance! 

I have noticed that my bank (and others) in the US don't add any leading zeros to the bank account number when displaying it to my User who will be typing it into my Stripe interface that I am creating. For example, at USAA's online login, it removes leading zeros when displaying bank account to the logged in user. This leaves me with fewer digits than are required. 

For using Stripe with US Bank Accounts, how many digits are required and is that standard across all US Banks?
How do I check for the number of digits without bringing the bank account into my code internally?
Does Stripe check for the number of digits sent for bank_account and help me by adding the preceding zeros for me?

I assume that *if* the US has a standard number of digits, we will have to check for number of digits and then, we must add preceding zeros to what they entered.

If we can't do that, how should we address the problem, since the User doesn't know what to do when the number of digits given to them by their bank does not equal the number of digits we are asking for. I could tell them to add preceding zeros, but that seems like we are relying on them to do this right.

Thanks,
Mark

Matthew Arkin

unread,
Jun 1, 2015, 7:00:57 PM6/1/15
to api-d...@lists.stripe.com
The only thing standardized across the US banking system is routing numbers (9 digits). Per ACH spec, bank account numbers can be anywhere from 4 to 17 digits but most commonly they are 9, 10, or 12 digits long.

Once you make a transfer to a managed account's bank account, if the bank refuses the transaction, Stripe would notify you and ask you for updated bank account info. 

--
Reply all
Reply to author
Forward
0 new messages