#JohnM-connected-acc-external-ba
1 messages ยท Page 1 of 1 (latest)
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
Have you looked at this already?
https://stripe.com/docs/api/external_account_bank_accounts/update?lang=java
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No. Thanks. I was just not looking at the right thing.
No worries ๐ Happy to help
Yea, but it does not look like that allows me to update the routing and account number
Oh wait, I believe I linked the wrong doc reference
Give me a few
This should be the right link
https://stripe.com/docs/api/accounts/update#update_account-external_account
apologies for the delay
You got an example using the AccountUpdateParams builder class ?
Not sure let me look
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 ?
actually banktoken.id
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