#dtfk

1 messages · Page 1 of 1 (latest)

mint gyroBOT
balmy anchor
#

I recommend just adding metadata to all manual payouts so you can tell them apart

lost cobalt
#

Hi @balmy anchor

#

Yesterday u recommended me a great idea to get transactions payout status

#

I have this question in continuation of that only

#

in List all balance transactions api

#

we have payout parameter which says
For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.

#

does it mean that workaround wont work with every payout id?

balmy anchor
#

Sorry am a bit confused on the question. The recommendation I provided yesterday should work with both manual and automatic payouts. If you want to be able to tell apart manual and automatic payouts, I recommend passing metadata for any manual payouts: https://stripe.com/docs/api/payouts/create#create_payout-metadata. This way, you can inspect that metadata in the payout.paid event. If there is no metadata set, then you know it's an automatic payout.

lost cobalt
#

ohhh if it work with both then its awesome

balmy anchor
#

Oh hold up

#

Yeah sorry I wasn't aware that only works with automatic payouts

#

That looks to be the case

#

But if your account is set to automatic payouts, you should only be getting automatic payouts anyway

#

Were you planning on switching to manual?

lost cobalt
#

actually the thing is this that business model interacts with various different stripe accounts & we need to enable webhooks on every stripe account

balmy anchor
#

I see. So some will be on automatic payouts and some manual?

lost cobalt
#

I think all are automatic only

#

but I am not sure

balmy anchor
#

If all are automatic then you're fine

lost cobalt
#

and i cant check as well

balmy anchor
#

Why can't you check?

lost cobalt
#

but if theres any code that will check that the payout is automatic

#

we dont have control

balmy anchor
#

You have access to run api requests on their account

lost cobalt
#

yes we have api keys

balmy anchor
#

Sorry am just a bit confused on what you're building

lost cobalt
#

but no access to dashboard

#

We have api keys but no dashboard credentials

balmy anchor
#

If you need to keep track of these things for manual payouts, then it gets a bit more complicated since with manual you're controlling which payments get paid out when, so it would be up to you to track that

lost cobalt
#

tell me something if any account has manual payouts enabled, do we receive payout.paid webhook notification if we have enabled this particular webhoook event?

balmy anchor
#

You will but you won't be able to tell the events apart afaik

#

between manual and automatic

#

Actually I think you might

#

On the event object

#

Because automatic payouts don't stem from api requests

#

I recommend testing this out in test mode though to confirm as I haven't tested it. But, it should work

lost cobalt
#

ohh ok

#

if request id = null on event object then its automatic

balmy anchor
#

It should be

#

Again I haven't tested it

#

I recommend testing with an automatic payout in test mode and a manual one

#

Request.id should be populated for manual payouts only

lost cobalt
#

actually this testing has became another challenge for me

#

its because payout needs a bank account

balmy anchor
#

Yeah you can use a real bank account in test mode

#

But nothing will happen

lost cobalt
#

by any chance any stripe test bank account active?

balmy anchor
#

For connect payout testing

lost cobalt
#

yes i tried the US one & its not working

balmy anchor
#

Is this on a connect account or your platform?

lost cobalt
#

on my platform

balmy anchor
#

Yeah I think those only work for connect accounts

#

Express and Custom

#

AFAIK you'll need to use real info for your platform to test

lost cobalt
#

is it free to create connect account

balmy anchor
#

Creating things in test mode is free

lost cobalt
#

ok

#

one thing more

#

yesterday u recommend me to match charge object balance txn id with list all balance transaction by payout id txn id

#

& mark as payout success

#

Correct?

balmy anchor
#

Yeah

balmy anchor
lost cobalt
#

i mean

#

yesterday u mentioned to check charge object for balance txn id

#

and then enable payout webhook

balmy anchor
#

Yes

lost cobalt
#

pick the payout id & make list all balance transactions by payout id

#

& then find the same balance txn id in charge payout

balmy anchor
#

Well you'd compare the balance transactions from the list all balance transactions by payout id to the ones from the charges I recommended you store in your own DB

lost cobalt
#

yeah

#

theres a develoment

#

actually i checked when we are creating charge on customer payment method , we are passing our unique Ref. id as well

#

in metadata

#

so when we receive payout.paid webhook notification

#

i am thinking to do list all balance transactions by payout id, type:charge & expand: data.source

#

in this way i receive expanded charge object in list all balances by payout id

trail hamlet
#

Hey, stepping in and catching up here

lost cobalt
#

Hey @trail hamlet

#

is it possible he can step in again please. its almost done

#

@balmy anchor can step in again

trail hamlet
#

They are out for the day and have shared the context.

lost cobalt
#

ohh ok

trail hamlet
#

I'm happy to answer any follow up questions

lost cobalt
#

so basically doing this will list out all payouts for the type:charges?

trail hamlet
#

That is correct

#

I'd highly recommend that you try it out on your end in test mode

lost cobalt
#

ok

#

one thing

#

like stripe doc says payout.paid can get failed as well

#

after sometime

#

is there any specific timeframe which tells beyond this it wont fail

trail hamlet
lost cobalt
#

not beyond that?

trail hamlet
#

Yes

lost cobalt
#

ok

#

tell me something when does payout.cancel takes place?

trail hamlet
lost cobalt
#

ok payouts dont get cancel automatically

#

somebody does it manually

trail hamlet
#

Yes, that is correct

lost cobalt
#

ok whenver we filter out list all balance transactions by payout id, type:charge & expand: data.source

#

do we receive any property that tells on this particular date this charge amount has been transferred to bank account

trail hamlet
#

Yes, it should return in "data" hash in the response.

lost cobalt
#

in that there's available on property

#

that tells it will be available in stripe balance

#

but which will tell that it will be available in bank account

trail hamlet
#

Yes, that is correct. It will return "available_on" which shows that date you're looking for.

lost cobalt
#

if u please see it shows about stripe balance availability

#

but i am looking for bank account availability

trail hamlet
lost cobalt
#

tell me something what does list all balance transactios do

#

because it gives all kinds of object

#

and then we can do filter on basis of payout id

trail hamlet
#

This lists historical changes to the balance

lost cobalt
#

and when we filter out n the basis of payout id

#

then what happens

trail hamlet
#

It only shows that historical changes to that specific payout. Like I mentioned, please test this on your end as it will be much clearer to see how all of this works.

lost cobalt
#

and if we list on basis of payout id & type : charge

#

it list all transactions that are transferrred to bank account

trail hamlet
#

That is correct, all historical changes to that specific payout

lost cobalt
#

ok thank you so much

#

for all the info'

#

🙂

#

@trail hamlet one thing more

trail hamlet
#

Sure!

lost cobalt
#

can we login stripe dashboard with stripe api keys only?

trail hamlet
#

I do not understand this question. To be clear, the Stripe Dashboard is separate from your Stripe API keys. The Dashboard you login with your credentials, and the API key, you use it to make API requests.

lost cobalt
#

okk

#

yeah