#oconnor0-checkout-session
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ I believe that's correct. Let me double-check
Yup, the balance transaction is created immediately after a charge is successful.
Excellent. Then I have a way to get the information I need when I need it.
I assume later the balance_transaction gets updated with the payout reference?
I don't think so. AFAIK each transaction that results in money-movement should have its own associated Balance Transaction. You can see by the type property all the different things that might result in a Balance Transaction being created: https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hm, OK, there must be some other connection between the balance_transaction and the payout because when I run stripe balance_transactions list --payout po_1K..., I get the charge and the payout balance transactions listed.
Oh, interesting. I didn't realize we allowed payouts to be returned via the Balance Transaction list
If you need to get the Payout from the Balance Transaction, though, I don't think you can do it via a single list API call
What specifically are you trying to do? Do you just want to get Payout information for an associated Balance Transaction?
Well, two different things.
- When a checkout session completes, I want to get the Stripe fee so I can record that.
- When I get a payout, I want to find all the balance transactions in the payout so I can "check them off" in my system.
So the balance transaction not getting updated with the payout doesn't matter since I can list the balance transactions for a given payout.
Which is what I care about.
Ah, okay. So it sounds like your set with the above methodologies. Any outstanding questions or concerns?