#dtfk
1 messages · Page 1 of 1 (latest)
I recommend just adding metadata to all manual payouts so you can tell them apart
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?
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.
ohhh if it work with both then its awesome
actually i got confused because in stripe doc payout paramater definiton says
For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout
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?
actually the thing is this that business model interacts with various different stripe accounts & we need to enable webhooks on every stripe account
I see. So some will be on automatic payouts and some manual?
If all are automatic then you're fine
and i cant check as well
Why can't you check?
but if theres any code that will check that the payout is automatic
we dont have control
You have access to run api requests on their account
yes we have api keys
Sorry am just a bit confused on what you're building
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
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?
You will but you won't be able to tell the events apart afaik
between manual and automatic
Actually I think you might
If request.id is null, you know it's automatic: https://stripe.com/docs/api/events/object#event_object-request-id
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
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
actually this testing has became another challenge for me
its because payout needs a bank account
by any chance any stripe test bank account active?
We have this section: https://stripe.com/docs/connect/testing#payouts
For connect payout testing
yes i tried the US one & its not working
Is this on a connect account or your platform?
on my platform
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
is it free to create connect account
Creating things in test mode is free
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?
Yeah
Not sure what you mean by this though
i mean
yesterday u mentioned to check charge object for balance txn id
and then enable payout webhook
Yes
pick the payout id & make list all balance transactions by payout id
& then find the same balance txn id in charge payout
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
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
Hey, stepping in and catching up here
Hey @trail hamlet
is it possible he can step in again please. its almost done
@balmy anchor can step in again
They are out for the day and have shared the context.
ohh ok
I'm happy to answer any follow up questions
Yes, what you have written out as what codename_duchess suggested. Here is the document that walks through this, https://stripe.com/docs/expand/use-cases#charges-in-payout
so basically doing this will list out all payouts for the type:charges?
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
I think this is what you're looking for: https://stripe.com/docs/payouts#:~:text=When a payout fails%2C it’s possible that its state initially shows as paid but then changes to failed (within 5 business days). It would happen within 5 business days
not beyond that?
Yes
When you cancel a payout, https://stripe.com/docs/api/payouts/cancel
Yes, that is correct
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
Yes, it should return in "data" hash in the response.
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
Yes, that is correct. It will return "available_on" which shows that date you're looking for.
if u please see it shows about stripe balance availability
but i am looking for bank account availability
I see what you're looking for. You'd just look at the payout object, https://stripe.com/docs/api/payouts/object#payout_object-arrival_date for the arrival date of funds.
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
This lists historical changes to the balance
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.
and if we list on basis of payout id & type : charge
it list all transactions that are transferrred to bank account
That is correct, all historical changes to that specific payout
Sure!
can we login stripe dashboard with stripe api keys only?
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.