#shahzaib-haider_code

1 messages ¡ Page 1 of 1 (latest)

sour nestBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1222843422709387294

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

blissful domeBOT
haughty whale
#

Hi, let me help you with this.

#

A fingerprint should be unique indeed.

wet pond
#

Ok, I will look into it.
But can you guide how to add two test bank account for testing purposes.

#

const STRIPE_SECRET_KEY = process.env.STRIPE_SECRET_KEY;
const NewStripe = stripe(STRIPE_SECRET_KEY, {
stripeAccount: subscriberConnectedAccountId,
});

let paymentMethods = await NewStripe.customers.listSources(
    customerId,
    {
      object: "bank_account",
    },
    {
      stripeAccount: subscriberConnectedAccountId,
    }
  );

let newPaymentMethod = await NewStripe.tokens.retrieve(bankToken, {
    stripeAccount: subscriberConnectedAccountId,
  });

const bank = paymentMethods.data.find((paymentMethod) => {
  return (
    newPaymentMethod.bank_account.fingerprint === paymentMethod.fingerprint
  );
});

return bank;
#

And above is code I am using to check if bank account is already present

haughty whale
#

Are you using test bank account numbers?

wet pond
#

I am using Plaid and getting bank token from plaid

#

let bankAccountToken = await plaidService.processStripePlaidConnectionToken(
access_token,
account_id
);

haughty whale
#

I don't know how plaid works exactly, but as I said, the fingerprint is what you can use to check uniquness. It's likely just a Test mode problem. In general, I don't think there's point to invest more time into it since Sources will be deprecated soon.