#dishant_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1272491602874466405
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
do you mean you want to retrieve a payout by ID
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
CanI get the Gross amout from payout objects?
I did this API code but I am not getting the gross amount
can I get this gross and fees from sumamry?
this is similar to https://docs.stripe.com/expand/use-cases#charges-in-payout
but you don't actually need the data.source expansion
because the Balance Transaction will have the information needed
const balanceTransactions = await stripe.balanceTransactions.list({
payout: 'po_xxx',
type: 'charge',
});
and then you sum the list
Got it, Thanks for the sugegstion
let me know if you need any more help
Does this approach contain refunds as well in balance transaction list?
If not then how can I get refunds as well?
no you would need another call to list all balance transactions of type refund
Based on payment intent Id can I get the payout Id?
it's not that easy
the other way around is possible
let me think of this for a second
ok
ok I found it
1st you need to find the balance_transaction of the PI
to do so you retrieve the PI by ID and expand on ["latest_charge.balance_transaction"]
the balance transaction contains a property called available_on
you can then use the List Payouts API to get any Payout by passing arrival_date[gte] set to the available_on from the balance txn
ohhkk
Understood!