#jahanzaib-transfer

1 messages · Page 1 of 1 (latest)

sweet owl
mossy latch
#

but in documentation it is mentioned that in destination you have to provide bank id

#

it is a payout

#

not transfer

sweet owl
#

oh sorry my bad, i saw transfer and got confused

#

can you share the request id which you're getting this error message for?

mossy latch
#

req_bPmwsAivEYN6zc

#

i am stuck in this error for the past 3 daysw

sweet owl
mossy latch
#

this is not paramater related to connected account mentioned in this documentation

sweet owl
#

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

mossy latch
#

is this fine ?

sweet owl
#
const payout = await stripe.payouts.create({
    amount: 100,
    currency: "usd",
   ...
},
{
    stripe_account: 'acct_...'
});
mossy latch
#

let me check

#

ill get back to you

#

the /payouts is not showing in logs now

sweet owl
#

but did the request succeed?

mossy latch
#

yeah i think so

#

let me test it again

#

nah its not working

sweet owl
#

what's the error message?

mossy latch
#

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

sweet owl
#

onesec

#

can you share your exact code snippet

mossy latch
#

'stripe_account' is depricated so i used 'stripeAccount'

#

??

sweet owl
#

heya @mossy latch sorry but i'm currently handling something urgent, someone else will step in shortly

topaz garden
#

Hi @mossy latch let me help you

#

Yes, please use stripeAccount instead, do you still get the error?

mossy latch
#

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

topaz garden
#

yes, you need to setup a external account for the payout.

mossy latch
#

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

wicked glacier
#

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?

mossy latch
#

ba_1JnKnHPEjzMsL8nqLGZffuXC

#

req_iAekpWzmYnP9pD

mossy latch
#

?????

wicked glacier
#

Sorry, totally slipped my mind. Looking now

mossy latch
#

😠

wicked glacier
#

Which test data did you use for the bank account?

mossy latch
#

are you talking about routing and account no ?

wicked glacier
#

Yep

#

My assumption is they're not meant to be used for external accounts (i.e. they're for a bank debit payment method)

mossy latch
#

i dont think so....because it should have thrown error when i was adding the external account

#

account no: 000999999991

#

routing number: 110000000

wicked glacier
#

But where did you find them/

mossy latch
#

it was in documentation

#

as you can see...the info is here

#

so there was no problem while adding the account

wicked glacier
#

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

mossy latch
#

i already tried that

#

it was not working

wicked glacier
#

Can you share the request ID where you passed that? It wasn't passed in req_iAekpWzmYnP9pD

mossy latch
#

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

wicked glacier
mossy latch
#

this is my function

wicked glacier
#

ba_1JnKnHPEjzMsL8nqLGZffuXC exists on acct_1JnKn9PEjzMsL8nq
Your API calls are made from acct_1H6fa0AfccEaIAWX

#

Which explains why you get a missing resource error

mossy latch
#

this is not possible!!!!

#

how can you check from which account api calls are made ?

wicked glacier
#

You'd see them in your Dashboard logs

mossy latch
#

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

wicked glacier
#

The API keys you're using – which account are they from?

mossy latch
#

Dark Technologies

wicked glacier
#

Which account ID is that?

mossy latch
#

acct_1H6fa0AfccEaIAWX

mossy latch
#

acct_1H6fa0AfccEaIAWX is the account id

#

ba_1JnKnHPEjzMsL8nqLGZffuXC is the bank id of 'acct_1JnKn9PEjzMsL8nq' this connected account

wicked glacier
#

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)

mossy latch
#

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

wicked glacier
#

There's the error:

{
  error: {
    message: "`instant` is not a supported method for payouts to a `bank_account` external account.",
    type: "invalid_request_error"
  }
}
mossy latch
wicked glacier
#

Do you understand why the request was on the connected account?

mossy latch
#

why its not showing here ??

wicked glacier
#

Which account are you signed in as there?

mossy latch
#

Dark Technologies

wicked glacier
#

That's why. The API request didn't happen on that account - therefore it's not in the logs

mossy latch
#

but i am using the api keys of the dark technologies account

wicked glacier
#

You passed the Stripe-Account header, so the API request was made by the connected account on behalf of the platform

mossy latch
#

so where can i see the logs ?

wicked glacier
wicked glacier
mossy latch
#

ok gimme me a minute

#

lemme test this

#

is this good ?

wicked glacier
#

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?

mossy latch
#

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

wicked glacier
mossy latch
#

its giving me insufficvient amount on test mode....that why i added this key

wicked glacier
mossy latch
#

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 ?

mossy latch
wicked glacier
#

Can I ask for some patience? I'm trying to help you, but equally there are other users who also need help

mossy latch
#

ok