#stefandespot_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/1488111354727366706
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hey there ๐ what's your connect charge path (direct, destination, separate charges & transfers)?
seperate charges & transfers
ok so in that approach, if you're listing balance transactions on the connected account, the source will be the transfer (rather than the charge)
for instance if you charge 10 and transfer 8 to the connected account, then check the source for that balance transaction, the object you receive will be a Charge object (with a 'payment' prefix: py_123), with an amount of 8 - this is because you're looking at the amount received by the connected account
I'm assuming, since you said "how are we supposed to get the actual payment object", you want to get from the balance transaction to the actual Charge, which was charged by the platform to the end customer (i.e. the 10, in this example) - is that right?
the way it works with separate charge and transfers looks like this:
On the platform account
-Charge object (ch_123) for full amount
-Balance transaction with source=ch_123
-Transfer (tr_123) to connected account
On the connected account
-Charge object (py_123) for transfer amount,
-The py_123 charge will have source_transfer=tr_123
-Balance transaction with source=py_123
Thanks โ that matches what i see.
I donโt need the platform ch_ for our seller UI โ only whatโs on the connected account.
Can you confirm i should use expand[]=data.source on list balance transactions to get the full source object? And for type payment vs payout, should i treat expanded source as the Charge / Payout objects in the API docs?
๐ Hey, taking over here, just taking a look
Ok, thank you
Yes, expand[]=data.source on GET /v1/balance_transactions (with the Stripe-Account header) is exactly the right approach. Without it, source is just a string ID (e.g., "py_123"); with it, you get the full object inline. And yes, the type field on the balance transaction tells you what the expanded source will be
Ok. Thank you so much