Martin Drapeau
Martin Drapeau

Reputation: 1534

Stripe - how to get balance transactions (credit card fees) from a charge in a Connected account

I am using Stripe. I process credit card payments on behalf of other Stripe accounts using Connect.

Now, I want to fetch credit card processing fees. There is this API endpoint for that: https://stripe.com/docs/api/balance_transactions/list

\Stripe\BalanceTransaction::all(['source'=> "ch_xxxxxx"]);

It works fine for my own Stripe account. However it returns an empty list for any charge made to Connected accounts.

How do I get those credit card charges via the API?

Upvotes: 0

Views: 919

Answers (1)

Nolan H
Nolan H

Reputation: 7419

What kind of charge are you making on the connected account? The Balance Transactions will only appear as type=charge then using "direct charges". If you're using Destination charges, these transactions appear as type=payment with source=py_123. If you use expansion to get the source with expand[]=data.source (data. because it's a list) you'll find a source_transfer (doc) you can use to trace to the original charge on your platform.

Upvotes: 0

Related Questions