#caleb-hailey_webhooks
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/1290504799225249803
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Some of our Stripe payments are processed via third-party integration with Stripe (e.g. Shopify), and for those transactions the fees that are present match the eventual payouts (and corresponding deposits in our bank account). But some payments are processed via Stripe Invoices (which we generate via the API) and we cannot figure out how to find all of the fees.
In the Stripe dashboard the payout shows the detail I'm looking for: po_1Q2R3qBCXur6eGR1KErkJV6u
Hi there, you can get the fee details from payment_intent->latest_charge->balance_transaction->fee_details
ok, let me try that real quick...
(thank you btw!)
ok, yeah, this is as far as I've gotten and I only see one of the two fees there
curl -H "Authorization: Bearer ${STRIPE_SECRET_KEY}" -XGET "https://api.stripe.com/v1/payment_intents/pi_3PxXnrBCXur6eGR11LqJgVIg?expand[]=latest_charge.balance_transaction" | jq .
The 0.4% invoice fee isn't included in the fee_details
ah, yeah, that's what I'm looking for though
it it accessible anywhere programmatically?
webhook or API?
or if not the exact fee information, is there a way to link invoices <--> payouts in a way where I could just do the math (invoice - payout == fees)?
Let me check and I'll get back to you
I can see the data I need in the dashboard, just can't find it in the API
The line that says "Charges" is the 2.9% + $0.30, which is present in the API... what I need is the line that says "Stripe Fees" which is the 0.4% + ???
...or even linking from payment_intent to payout would work as well I suppose
Thanks for waiting. The invoice fees are charged separately. In Dashboard you can find it at https://dashboard.stripe.com/balance?type=stripe_fee You can also use balance transaction list API and filter type by stripe_fee
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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 looks like it works!
curl -H "Authorization: Bearer ${STRIPE_SECRET_KEY}" -XGET "https://api.stripe.com/v1/balance_transactions?payout=po_1Q2R3qBCXur6eGR1KErkJV6u" | jq .
Yes you are right
ok, now I just need to figure out the right webhook to be notified when these values are available
perhaps use the payout.created webhook, then query the balance_transactions API with the payout ID to get the fee details?
That sounds like a good idea!