#juneid_90104
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- juneid_90104, 19 hours ago, 40 messages
Let me explain
So in my app, I have implemented a pay-via-bank accounts option.
When the customer is about to pay I also show them already attached bank accounts to their stripe account.
This is for ACH Debit?
But if the customer does not select from them and still add the same bank account asa new account stripe through exception that this bank account is already attached.
Let me share you the logs
yes.
So you want to prevent them from adding the same bank account again?
using plaid
Yes but the issue is i can not decide if the new bank account already exists
let me share the logs id
Yeah you can't stop them from adding the same one. But you can look at the fingerprint (https://stripe.com/docs/api/customer_bank_accounts/object#customer_bank_account_object-fingerprint) to know if that bank account already exists or not.
Then you can detach one of the duplicates if that is the case.
req_EqabbejMU2TbkD
The issue is
i have the fingerprint for already attached accounts but how can i get the fingerprint of the account that i am going to validate
You can see the fingerprint right there in response to that request
which request
Ah you are using Plaid you said
So yeah after they create their bank account via Plaid and before you actually charge it you can check
That is the point in your flow
"btok_1Ocrh5CEgXQRZLhk0MeTEfYZ"
in my app i am only reciving this
how can i integrate to recive the whole response
var bankAccount = PlaidHelper.CreateStripeBankAccount(plaidToken.AccessToken,
bankAccountPurchaseObject.PlaidAccountId, msgs);
the last request was sent using this method
Yeah one sec. I'm refreshing myself with the Plaid flow since it is legacy now
public class BankAccount : PlaidObject
{
public string StripeBankAccountToken { get; set; }
internal static BankAccount FromDynamicObject(dynamic result)
{
return new BankAccount()
{
StripeBankAccountToken = (string)result["stripe_bank_account_token"],
RequestId = (string)result["request_id"]
};
}
}
Okay so you actually want to check after you attach to the Customer
no
So the next step in your flow is to attach that Bank Token to a Customer right?
Right
So after you attach then you can inspect the bank account object
And see the fingerprint
but the exception is thrown while attaching
What exception?
Ah wait a second
You should also be able to retrieve the Token
That is likely the best route actually
So before you attach to the Customer, retrieve the Token and you should see the full Bank Account object
"btok_1Ocrh5CEgXQRZLhk0MeTEfYZ"
lets say i have this right now
as you can see it is in the log i shared with you
Yep
how can i get th efull reponseusing this
Using the retrieve Token API that I just shared: https://stripe.com/docs/api/tokens/retrieve
It works with both. The tok_xxxx is for a Card Token
So upon using this i will be able to get fingerprint and match them with list that I already have and i can avoid re attaching
Thank you very much sir i will test it out
Sounds good