#shahzaib-haider_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
Hi, let me help you with this.
A fingerprint should be unique indeed.
More importantly, Sources and Tokens is a deprecated API that will be sunsetted for non-card payments soon. That's why I can't say it works the same way. I strongly encourage you to upgrade your integration: https://docs.stripe.com/payments/payment-methods/transitioning
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
Are you using test bank account numbers?
I am using Plaid and getting bank token from plaid
let bankAccountToken = await plaidService.processStripePlaidConnectionToken(
access_token,
account_id
);
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.