#Qualle-financial-connections

1 messages ยท Page 1 of 1 (latest)

weary mauve
#

Hello! Can you show me a specific example?

cobalt grove
#

sure!

#
{
    "id": "btok_1LTU9kFAWKEWQzfqSh76zLoa",
    "object": "token",
    "bank_account": {
        "id": "ba_1LTU9kFAWKEWQzfqHEehLr1f",
        "object": "bank_account",
        "account_holder_name": null,
        "account_holder_type": null,
        "account_type": null,
        "bank_name": "STRIPE TEST BANK",
        "country": "US",
        "currency": "usd",
        "last4": "6789",
        "name": null,
        "routing_number": "110000000",
        "status": "new"
    },
    "client_ip": "137.25.183.43",
    "created": 1659719872,
    "livemode": false,
    "type": "bank_account",
    "used": false
}
#

here is the test bank account generated by financial sessions

#

then I call

#
await stripe.accounts.update(account, {
  external_account: 'btok_1LTU9kFAWKEWQzfqSh76zLoa',
});
#

but when I look in external accounts for this customer

#
Type
Bank account
Created
8/5/22, 10:19 AM
Origin
United States
Fingerprint
u40haMXnymaRirnm

ID
ba_1LTUAy2XKGhxupIzZ6rWADQS
#

id is ba_1LTUAy2XKGhxupIzZ6rWADQS, not ba_1LTU9kFAWKEWQzfqHEehLr1f

#

is this typical?

#

we also store this bank information in our database, so id can be reference too update or delete this external account if needed

#

but it says the external account does not exist for id we have stored, because it is indeed different

weary mauve
#

Yeah I believe that change is expected - when you're creating the token (and the underlying Bank account) those objects are on the Platform. When you add them to an account (as an external account) we need to create a Bank Account object on the connected account instead, which has a different ID

cobalt grove
#

ok so how can anyone retrieve the id of that external account

#

to delete it

#

ah

#

using

const bankAccount = await stripe.accounts.retrieveExternalAccount(
  'acct_1GndK7FAWKEWQzfq',
  'ba_1LTUDRFAWKEWQzfqfPuzG1BX' <---- id I have stored
);
weary mauve
#

๐Ÿ‘ Yeah you need to retrieve it as an external account for the connected account

cobalt grove
#

sometimes a break from this is all it takes ๐Ÿ˜„

#

thank you

weary mauve
#

happy to help ๐Ÿ™‚

cobalt grove
#

ugh, its still not working retrieveExternalAccount requires actual id of external account

#

I have no idea how to store that id because its available nowhere except stripe

weary mauve
#

Can't you store the ID of the Bank Account that is generated after you call await stripe.accounts.update()?

cobalt grove
#

I see the ID in the response ๐Ÿ˜ญ

#

thank you so much

weary mauve
#

๐Ÿ‘ perfect!