#juneid_90104
1 messages · Page 1 of 1 (latest)
Hello! What's your question about that error?
When I am trying to attach a bank source to the stripe account which is already attached i am getting this error.
How can i handle this situation in my app
That depends on your desired outcome. Do you not want to use the bank account that's already attached to the Customer?
stripe gives me already attached bank sources but how can I validate that if an already attached bank source is going to be attached so that I can avoid it and use the existing source
I want to use that card but as i am always attaching the card on my flow so how can i decide if i should attach or directly choose the source from list provided by stripe.
You attempt to attach the new one and get the error you're running into.
No i attempt to attachwhich is already attached
Sorry, not sure I understand. Can you provide the request ID with this error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_F65jvNWoGwuftJ
Okay, so prior to that you created the Bank Account Token in this request: https://dashboard.stripe.com/test/logs/req_uIDVzOJeEK2suc
yes
You can see in the response there the Bank Account Token has a fingerprint. You can use that to determine if the Bank Account Token matches an existing Bank Account you already have on file or not: https://stripe.com/docs/api/customer_bank_accounts/object#customer_bank_account_object-fingerprint
lets say
i have the fingerprints for already existing banks because stripe is providing me the list.
nut how can I get the fingerprint of the token that is under test?
before attaching the source to the customer i only have access token
Not sure I understand... you have the fingerprints from the ones on file (you can get them fromt he API) and you have the fingerprint of the new one when you create the Bank Account Token (it's in the response when you create it) so you can compare them.
Ok let me check
StripeBankAccountToken = (string)result["stripe_bank_account_token"],
RequestId = (string)result["request_id"]
i am retriving only these two how can i retrive the fingerprint as well
I don't have enough context. What is result?
var bankAccount = PlaidHelper.CreateStripeBankAccount(plaidToken.AccessToken,
bankAccountPurchaseObject.PlaidAccountId, msgs);
i have a function which returns be object of bank account type
Does result have a fingerprint property?
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"]
};
}
}
no, because the object have only two properties
stripebankaccounttoken
and request it
i think here is something that can be done
Can you dump or log everything in result to see what properties it has?
{{
"request_id": "arkkB83N3EpPgD6",
"stripe_bank_account_token": "btok_1OcYUUCEgXQRZLhkvlKKu6hI"
}}
i am getting only this from request
Ah, okay, that helps.
You can use the btok_ ID there to retrieve the Bank Account Token from the Stripe API: https://stripe.com/docs/api/tokens/retrieve
Then you'll have the fingerprint.
but this api is expecting id starting from tok not btok_id
I thought you could fetch a btok_ with it... is it not working?
i hav eto implement first