#Luca Monari

1 messages ยท Page 1 of 1 (latest)

split gardenBOT
keen shoal
#

Where do you see 2 accounts still?

#

My guess is its not actually deleted as one of these restrictions apply:

There are restrictions for deleting a bank account with default_for_currency set to true. You cannot delete a bank account if any of the following apply:

The bank account's currency is the same as the Account[default_currency].
There is another external account (card or bank account) with the same currency as the bank account.

#

Not sure why the API doesn't error in that instance

leaden quartz
#

What would be the correct procedure to creating a new one and deleting the previous?

keen shoal
leaden quartz
#

We were referring to: To delete a bank account, you must first replace the default external account by setting default_for_currency with another external account in the same currency.

keen shoal
#

Both restrictions seemingly apply:

  • The bank account's currency is the same as the Account[default_currency].
  • True, USD
  • There is another external account (card or bank account) with the same currency as the bank account.
  • Also true, USD.
#

Hmm

#

Wonder if its some kind of race condition. I assume you're awaiting the successful creation of the new account, before attempting deletion of old?

leaden quartz
#

yes. The 2 calls are made sequentially โœ…

#

Let me check if on test account I see the same behavior

keen shoal
#

Sequentially? For example, they're made roughly ~1 second apart. Yet in our internal logs end to end duration for the creation was ~1.6s

leaden quartz
#

In our code first we make the call for creating the new bank account by calling stripe.Account.create_external_account with the default_for_currency=True
Once we receive the response we proceed for the delete request by calling stripe_api_client.Account.delete_external_account (passing the old bank account id obviously).

keen shoal
#

Checking something

#

Yeah unfortunately it's not really clear to me what's going on here, and whether this is expected or not. My recommendation would be to write in to our team (via https://support.stripe.com/contact/email?topic=api_integration) providing as much context as possible. That way we can set aside some time to properly investigate.

leaden quartz
#

Ok thanks a lot. Will do ๐Ÿ‘

keen shoal
#

np, sorry I couldn't figure it out!