Stinny
Stinny

Reputation: 199

How do I remove a bank using Stripe connect custom and standard accounts?

I am building a marketplace using the MERN stack. Currently I allow users to connect their Stripe account for payouts, which are standard Stripe accounts. I am now integrating bank account payouts so I am creating custom accounts for that option(using Stripe hosted forms).

When the users finishes the onboard process and the bank is connected, I give them the option to edit the info or remove the bank in the case that they want to connect their Stripe account.

It is unclear to me what I should do with the custom account.

Should I be deleting the custom account in the background?

Upvotes: 0

Views: 195

Answers (1)

Lucky2501
Lucky2501

Reputation: 1704

I believe the call you're trying to make is this:

const deleted = await stripe.accounts.deleteExternalAccount(
  stripe_account_id,
  ba_id
);

The documentation does outline some limitations with that call, namely that you can't delete the bank account if it's the only one for the account's default_currency. There needs to be a replacement already present.
https://docs.stripe.com/api/external_account_bank_accounts/delete

Upvotes: 1

Related Questions