#ptman_unexpected
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/1381891506159489075
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
here's an example from the dashboard, from the testing environment
Hi! This channel is for direct technical integration with Stripe. I recommend contacting Support, and they will be able to assist you with that!
Hello @twin cloak, we have sent you a direct message, please check it at https://discord.com/channels/@me/1381894065632575599
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
I'm asking about how I can find that refund via the API
so that we can programmatically generate correct reports
isn't the API direct technical integration?
Do you have an object ID for the payment?
pi_3RXzbTJU9SZr1WsC0UzF9S7f
our backend is in go
when the payment intent succeeds we get pi.LatestCharge.BalanceTransaction.FreeDetails with stripe_fee
but that's without the processing fee refund
Thanks for waiting!
When you capture a charge for an amount lesser than what was initially created, it created a refund object: https://dashboard.stripe.com/test/events/evt_3RXzbTJU9SZr1WsC0h3F7Foj
The refund object for this payment is: re_3RXzbTJU9SZr1WsC0d8OVkZE
That Refund has a BalanceTransaction txn_3RXzbTJU9SZr1WsC0AxKXfnW which shows the money for the refund leaving the balance.
You can retrieve the balance transaction via this API call: https://docs.stripe.com/api/balance_transactions/retrieve
Alternatively, you can retrieve the refund object itself (https://docs.stripe.com/api/refunds/object?api-version=2025-05-28.basil#refund_object-balance_transaction) and expand charge.balance_transaction and balance_transaction to get more details on Stripe processing fee refund
Thank you. Is the refund object available immediately? Or do I need to keep looking for it?
and what's is the best way to find the refund object when you have the payment intent?
In order to trace a refund, you should follow this guide:
https://docs.stripe.com/refunds?dashboard-or-api=api#tracing-refunds
You can listen to the webhook refunds.updated for example and you'll get notified whenver a refund if generated