#uladzislauchekanau
1 messages · Page 1 of 1 (latest)
Hello! Currently I don't believe we have any video tutorials for this - we do have docs though (https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
Yeah, that's what scares me, cuz I am trying to follow the docs and it's basically not working, and nobody knows how it works and there is no video about it, so I am starting to think that this functionality doesn't work at all
Okay, nevermind, thank you 🙂
If you have a specic requests/place you're stuck feel free to ask here and I can try and help
How can I create an InboundTransfer with bank account? When I try myself I receive
{
"error": {
"message": "BankAccount ba_1NXR9tGawvWgtRr1xytk7U9n must have an active mandate to be valid. Please associate a mandate with this BankAccount by passing mandate_data to SetupIntents. See https://stripe.com/docs/payments/setup-intents#mandates for more information.",
"request_log_url": "https://dashboard.stripe.com/acct_1NXNyFGawvWgtRr1/test/logs/req_psT5pYC5LYzL5V?t=1690216076",
"type": "invalid_request_error"
}
}
But there is no way to assign mandate to a bank account, BankAccount doesn't even have any field related to Mandate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah you wouldn't create the Mandate directly - like we say in the error message and in the docs, you'd want to use a SetupIntent to configure the bank account properly first
This is probably what you want to read: https://stripe.com/docs/payments/ach-debit/set-up-payment
But SetupIntent creates PaymentMethod and not BankAccount
And mandate is assigned to PaymentMethod and not BankAccount
You can use the BankAccount (ba_123 ID) you have with a SetupIntent - it'll just configure it to add the mandate and it'll still work with the inbound transfer flow
How can I assign BankAccount to SetupIntent?
You'd set it as payment_method in the SetupIntent
But it is payment method and not bank account ;/
Okay, maybe another way: is it possible somehow to assign payment method to connected account?
Sorry let me back up
BankAccounts are an older API that can be used as multiple things - we allow them to be used as PaymentMethods when properly configured
For your flow, the SetupIntent is mainly to properly configure the BankAccount to have a mandate
Just because you set it as payment_method doesn't mean that it'll stop working for your inbound transfers
You can even see in the inbound transfers docs (https://stripe.com/docs/treasury/moving-money/working-with-bankaccount-objects#creating-a-setupintent) - they tell you to set it as payment_method
So after I create bank account I have to once again create setup intent with that bank account in order for it to have mandate?
Yes - or you'd use the SetupIntent directly to create the BankAccount (it'll create it for you, instead of you having to create it separately)
How can I do this?
It's all covered in the docs I sent over to you earlier (https://stripe.com/docs/payments/ach-debit/set-up-payment) - definitely read through the whole thing since we explain how to do it
Also just want to reiterate - BankAccounts and PaymentMethods that you create for bank accounts can be used interchangeably (we mention this in our docs https://stripe.com/docs/treasury/moving-money/working-with-bankaccount-objects)
But here it only mentions UsBankAccount which not equals to BankAccount object
Did you read what I linked you to in https://stripe.com/docs/treasury/moving-money/working-with-bankaccount-objects ? We mention you can use PaymentMethods created for bank accounts with Inbound Transfers
But payment method is attached to customer and not connected account and when I try to create InboundTransfer with pm_** it says it can’t find this PaymentMethod because it is not attached to the connected account
I’ve read all these pages multiple times today already
We say it right here:
Attach the PaymentMethod to a connected account or platform account if you intend to use the payment method for an inbound transfer or outbound transfer between an external account that belongs to the same business as the Stripe account.
I saw it 🙂 I have tried passing attach_to_self and on_behalf_of but then I receive the following error on the client side
{
"error": {
"message": "Cannot create a testmode session using a livemode API key, or vice versa.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_tTdxSA5RvZ9djB?t=1690209729",
"type": "invalid_request_error"
And it’s actually so broken cuz it says I am using live key but I don’t even have it anywhere
And if you ll try follow the link it will not lead to anywhere
Do you have the connected account ID that you tried linking it to?
Give me a moment please
Is it okay if this thread will hang for 10 mins, I am away from my computer rn
?
yup go ahead
Hello! I'm taking over and catching up...
Sure
Okay, so that connected account is connected to your platform in test mode only. For that request to succeed you need to make it using your test API key, not your live API key.
As I have mentioned, I was not using live key, because I don't even have it 🙂
So you used your platform's test key?
Yep
Request payload: client_secret=seti_1NXPxHKBaG8UnmrcaiT6UFHb_secret_OK45dsJuR3s0n1H99JgravMsZpGQBDN&attach_required=false&payment_method_data[type]=us_bank_account&manual_entry_only=true&key=pk_test_51***
{ message: "Cannot create a testmode session using a livemode API key, or vice versa.", request_log_url: "https://dashboard.stripe.com/test/logs/req_tTdxSA5RvZ9djB?t=1690209729", type: "invalid_request_error" }
In the end of payload you can see it's a test key
This problem is occurring only when I use attach_to_self: true when creating SetupIntent
What's your ultimate goal? What are you trying to build?
I want my customers to be able to move money in and out of financial account
to/from bank account
Using ACH?
As far as I know it uses ACH by default for inbound transfers
and for Outbound I am providing an ability to choose between ACH and Wire
Why are you setting on_behalf_of to that connected account?
Yeah, it would be, but I don't understand why you're trying to connect this account to a Custom connect account?
I want to have mandate on the bank account in order to create Inbound Transfer
Oh, so this is the account representing a customer's bank account?
yes
For my customers I have Customer account and connected account with financial account
For now, I create SetupIntent to have PaymentMethod attached to the Customer
On setup_intent.succeeded I attach externalBankAccount to the connected account of a customer
Instead of using on_behalf_of have you tried making the request/Setup Intent on the connected account instead?
If you mean via Stripe-Account header - yes
Same error or different with that approach?
I don't remember actually, lemme do this again
Different
{
"message": "The client_secret provided does not match any associated SetupIntent on this account.",
"param": "client_secret",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_1HZv8rmGRXyml7?t=1690221548",
"type": "invalid_request_error"
}
What's the purpose of on_behalf_of then?
You have to create the Setup Intent on the connected account.
on_behalf_of is when you have the Setup Intent on your platform but you want a connected account to be the merchant of record.
I see, thanks
If the Setup Intent is on the connected account then it's the merchant of record without you having to do anything extra.
but I am passing Stripe-Account
Right, but you need to create the Setup Intent on the connected account.
Right now you're using a client secret that belongs to a Setup Intent that exists on your platform account.
When you try to use that Setup Intent's client secret on a connected account you get the error above because the Setup Intent doesn't exist on that connected account.
How do I create it on the connected account then?
You use the Stripe-Account header when creating the Setup Intent.
But that's what I am doing rn
{
"message": "The client_secret provided does not match any associated SetupIntent on this account.",
"param": "client_secret",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_1HZv8rmGRXyml7?t=1690221548",
"type": "invalid_request_error"
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this is the error I get
on the FE
Yeah, so you have a client secret, where did that come from?
Right. So did you modify your backend code to create the Setup Intent on the connected account?
yes
Or is it still creating the Setup Intent on your platform account?
I am passing Stripe-Account now
So it looks like this second request to get an elements session is taking place on your platform account, not the connected account.
You need to add the Stripe-Account header there as well, since this needs to happen on the connected account where the Setup Intent is.
I have to pass the connected account id on the FE also somehow?
Yes.