#JohnM-connected-acc-external-ba

1 messages ยท Page 1 of 1 (latest)

jovial pawn
#

Hello ๐Ÿ‘‹
How can I help you? ๐Ÿ™‚

thin ruin
#

this is my logic in java for adding a external bank account to a custom connect account

#

Map<String, Object> params = new HashMap<>();
params.put(
"external_account",
bankToken
);
try{
BankAccount bankAccount =
(BankAccount) account
.getExternalAccounts()
.create(params);
} catch (StripeException e) {
throw new StripeClientException(e.getCode(),e.getMessage());
}

#

I do not see a .update uption on the .getexternalaccount method

#

the account object is the connected account object. The bank token is as result of the create bank token api

#

In my case, I have already created the custom connected account. Now, I need to have a update method incase the connected account changes their bank account information

jovial pawn
thin ruin
#

No. Thanks. I was just not looking at the right thing.

jovial pawn
#

No worries ๐Ÿ™‚ Happy to help

thin ruin
#

Yea, but it does not look like that allows me to update the routing and account number

jovial pawn
#

Oh wait, I believe I linked the wrong doc reference
Give me a few

thin ruin
#

You got an example using the AccountUpdateParams builder class ?

jovial pawn
#

Not sure let me look

thin ruin
#

Would this work

#

Account account = Account.retrieve(payee.getStripeAccountToken());
AccountUpdateParams accountUpdateParams = AccountUpdateParams.builder()
.setEmail(payee.getEmailAddress())
.setCompany(updategetCustomCompany(payee))
.setBusinessProfile(updateBusinessProfile(payee))
.setMetadata(metaData)
.setExternalAccount(banktoken)
.build();

#

where banktoken is the token of the new bank information ?

jovial pawn
#

Not sure as I haven't personally tested this flow but feel free to give it go in test mode and we can work with the error if there's one