Is there a way to confirm that bank account has already been added before adding them to stripe. I'm using plaid to get the btok_
token and then adding it as a new source to the stripe customer. I get this error when i try to add it.
Plaid docs have some info on preventing this on the Plaid side: https://plaid.com/docs/link/duplicate-items/.
The typical way of doing this works like this:
Make sure to put the Link flow behind a login, so that you have identifying information about your end-user when they start Link.
Store the value of the mask
returned by the onSuccess
callback in Link and associate it with the user.
Before calling /item/public_token/exchange
on a public token, check the mask
returned by onSuccess against previous mask
s for the same user. If you find a match, the account that was just added is very likely a duplicate bank account; do not call /item/public_token/exchange
.