#jahanzaib-transfer
1 messages · Page 1 of 1 (latest)
hello @mossy latch! the destination refers to a connected account id. A connected account id looks like acct_123.
If you refer to the Transfer object - https://stripe.com/docs/api/transfers/create, there's no such parameter method.
I think you may be confused between Transfers and Payouts - these are two different objects :
https://stripe.com/docs/api/transfers
https://stripe.com/docs/api/payouts
but in documentation it is mentioned that in destination you have to provide bank id
it is a payout
not transfer
oh sorry my bad, i saw transfer and got confused
can you share the request id which you're getting this error message for?
you'll need to make the API call with the Stripe-Account header - https://stripe.com/docs/connect/authentication
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this is not paramater related to connected account mentioned in this documentation
If you don't specify the Stripe-Account header, Stripe would assume that you're trying to create the payout on your own platform account.
This payout (and bank account) needs to exist on the connected account, so you need to use the Stripe-Account header to inform Stripe that this payout should be created on the connected account
i do agree that it can be a bit unintuitive since the Stripe-Account header isn't an explicit parameter
is this fine ?
const payout = await stripe.payouts.create({
amount: 100,
currency: "usd",
...
},
{
stripe_account: 'acct_...'
});
but did the request succeed?
what's the error message?
it think this syntax is wrong
the create payout method does not seem to accept the 2nd object
it does not expect the 2nd object
this method is not working now
heya @mossy latch sorry but i'm currently handling something urgent, someone else will step in shortly
Hi @mossy latch let me help you
Yes, please use stripeAccount instead, do you still get the error?
yes
if i remove the stripeAccount object
the function is working...its giving me the old error....'resource missing no external account'
if i use the stripeAccount object this function is not even working
there are even no logs about payout on stripe dashboard
yes, you need to setup a external account for the payout.
yeah man thats the issue
there is a external account for this account
i confirmed this in stripe dashboard
so there is no issue with that
so this is the request
and you can see there is a external account
Hey! Taking over from @topaz garden – please bear with me while I get caught up
Can you paste that ba_xxx ID for me please?
Or even the request ID (req_xxx) for that API request you shared above?
?????
Sorry, totally slipped my mind. Looking now
😠
Which test data did you use for the bank account?
are you talking about routing and account no ?
Yep
My assumption is they're not meant to be used for external accounts (i.e. they're for a bank debit payment method)
i dont think so....because it should have thrown error when i was adding the external account
account no: 000999999991
routing number: 110000000
But where did you find them/
it was in documentation
as you can see...the info is here
so there was no problem while adding the account
Ah, think I know the issue
The bank account (ba_xxx) exists on a different account (I assume a connected account?)
You need to pass the stripeAccount parameter when creating the Payout
Can you share the request ID where you passed that? It wasn't passed in req_iAekpWzmYnP9pD
and in official document there was no paramater called stripeAccount whily creating a payout
when i was passing the stripeAccount....the /payouts logs was not even showing
so i removed that
That's just expected for when you're working with connected accounts though
this is my function
ba_1JnKnHPEjzMsL8nqLGZffuXC exists on acct_1JnKn9PEjzMsL8nq
Your API calls are made from acct_1H6fa0AfccEaIAWX
Which explains why you get a missing resource error
You'd see them in your Dashboard logs
in destination i am providing the id of the bank in which i am trying to add the credit....
this method is triggered when the user completes the job
ba_1JnKnHPEjzMsL8nqLGZffuXC is the destination bank id
in api calls i was not providing the connected id
but this error was still showung
The API keys you're using – which account are they from?
Dark Technologies
Which account ID is that?
acct_1H6fa0AfccEaIAWX
acct_1JnKn9PEjzMsL8nq is the connected account id
acct_1H6fa0AfccEaIAWX is the account id
ba_1JnKnHPEjzMsL8nqLGZffuXC is the bank id of 'acct_1JnKn9PEjzMsL8nq' this connected account
Yes, exactly - as I just stated above
So when you're creating your Payout you need to pass the stripeAccount header with the related connected account (acct_1JnKn9PEjzMsL8nq)
yeah man i tried that... i told you... it was not working
i passed the acct_1JnKn9PEjzMsL8nq id
this was the api call when i was not passing the stripeAccount object
but when i provided the stripeAccount object there was /payouts api call on stripe logs
are you getting when i am trying to say ?
broo
Yes, because it'll be on the logs of the connected account
There's the error:
{
error: {
message: "`instant` is not a supported method for payouts to a `bank_account` external account.",
type: "invalid_request_error"
}
}
not on that either
I just sent you the link
Do you understand why the request was on the connected account?
This doc highlights how API requests on behalf of connected accounts work: https://stripe.com/docs/connect/authentication
why its not showing here ??
Which account are you signed in as there?
Dark Technologies
That's why. The API request didn't happen on that account - therefore it's not in the logs
but i am using the api keys of the dark technologies account
You passed the Stripe-Account header, so the API request was made by the connected account on behalf of the platform
so where can i see the logs ?
The Stripe-Account header bypasses that. The API key just gives you authority as the platform of the account
Do you not have logging in your application? You should catch these errors there
Well you likely want to do something with err in your catch block. If you did then you'd have seen the error messages
Did it work?
ch_3K6Dx8AfccEaIAWX1XG1YNu1
you can check....this is a valid id
how can i see this payout logs in stripe ?? it easy for me there!!!
it is not showing in connected account logs
You're passing invalid parameters. sourceTransaction isn't valid for a Payout: https://stripe.com/docs/api/payouts/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
its giving me insufficvient amount on test mode....that why i added this key
Right but it's not even valid. The error says you need to provide source_type: https://stripe.com/docs/api/payouts/create#create_payout-source_type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
first of all this is optional
and you can see in the function that i provided the source_type
insufficient balance on test mode....how can i solve this ?
please also answer this
..
Can I ask for some patience? I'm trying to help you, but equally there are other users who also need help
ok