#Luca Monari
1 messages ยท Page 1 of 1 (latest)
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
If I go to https://dashboard.stripe.com/connect/accounts/acct_1INyxRPhZIYR0uxU/activity I'm able to see 2 bank accounts
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
What would be the correct procedure to creating a new one and deleting the previous?
Based on the restrictions I outlined (from here: https://stripe.com/docs/api/external_account_bank_accounts/delete) I don't think you'll be able to delete in this scenario
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.
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?
yes. The 2 calls are made sequentially โ
Let me check if on test account I see the same behavior
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
Please have a look at this account on test mode: https://dashboard.stripe.com/test/connect/accounts/acct_1ILvHx4Jsx0e5dEi/activity
In this case we were able to delete the bank account ba_1MOkLi4Jsx0e5dEiAdKXnhRO with request req_MuvzqHQmWSKPLB (using the same process)
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).
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.
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Ok thanks a lot. Will do ๐
np, sorry I couldn't figure it out!