#neat_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/1229897455127232623
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- neat_api, 7 hours ago, 5 messages
Hi there! You'll want to look at the Balance Transaction object for the charge
and look at the fee value: https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-fee
yep that's what I'm trying to get to through the charge object
if that makes sense
first I need to get the charge of the payment_intent, only then I can get the balance_transtion right?
because payment_intent does not contain any info with which I can get the balance_transtion
Right, so if you start with the PaymentIntent, you can get its latest_ charge. Then, you can list balance transactions where source: ch_123abc
or I can directly retrieve the balance_transaction because the charge object contains balance_transaction field which is the id of the balance_transtion, but the problem is when I try to retrieve the charge it says the resource does not exist
Right, exactly. And the charge you're attempting to retrieve is ch_3P6IagQqBknJg87a0kRiJlTu ?
yep
I can see on the (connect custom) account: "acct_1P3ew4QqBknJg87a" payment > activities that it was created
Since I can see the charge object on the dashboard I can also see it's balance_transaction field with value "txn_3P6IagQqBknJg87a07IDwZkL" but I cannot retrieve the balance_transaction as well
it simply does not exist
note that I'm in test mode
You're right, charge ch_3P6IagQqBknJg87a0kRiJlTu was created directly on the Custom account. I suspect you're logged into the CLI as your platform, which is why you can't retrieve these objects with CLI commands
Taking a step back though, we don't recommend using direct charges with Custom accounts. You really should use destination charges or separate charges & transfers with Custom accounts
With both destination charges and separate charges & transfers, the Charge object is created on your platform account, not on the connected accounts.
hmmm... any particular reason I shouldn't be using "direct charges"?
Custom accounts don't have dashboard access so they can't address disputes. With direct charges, the refunds come from the connected account's balance and Stripe fees are not returned for those, so it's much more likely for connected account balances to become negative. In that case, we hold a reserve from the platform's available balance: https://docs.stripe.com/connect/account-balances#understanding-connected-reserve-balances
Also, since all charges "live" on the connected accounts, it's more work for you as the platform to retrieve metrics (e.g., decline and conversion) since all of that data will be spread across the accounts instead of on your platform.
Also, if you use Radar, Radar rules on your platform only apply to charges created on your platform, not charges created on yoru connected accounts. Custom accounts cannot create their own Radar rules
hmmm... ok got it will take your points into consideration, btw I fixed the issue too.
do you want me to tell you how I fixed the issue?
Sure
when instanciating the stripe object make sure to pass the id of the connect account to it (it's StripeConfig param)
Right, that way you're retrieving the objects "as" the connected account
yep, that how I was creating the (payment) elements on the client as well
Still, I recommend updating your integration to use destination charges or separate charges & transfers. You wouldn't have to pass the ID of the connected account in the StripeConfig in that case
ok will take your suggestion into considiration (it's not a personal project but for a client)
anyway... thanks for the help!
If they haven't already, I recommend they review this: https://docs.stripe.com/connect/charges
Happy to help!
ok, will let them know
thanks again for the help!
Can I share this thread with them, is this public?
Yes, you can share this with them: https://discord.com/channels/841573134531821608/1229897455127232623