#neat_webhooks

1 messages ¡ Page 1 of 1 (latest)

tired elmBOT
#

👋 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.

low basinBOT
#

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.

last gull
#

Hi there! You'll want to look at the Balance Transaction object for the charge

plush hedge
#

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

last gull
#

Right, so if you start with the PaymentIntent, you can get its latest_ charge. Then, you can list balance transactions where source: ch_123abc

plush hedge
#

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

last gull
#

Right, exactly. And the charge you're attempting to retrieve is ch_3P6IagQqBknJg87a0kRiJlTu ?

plush hedge
#

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

last gull
#

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.

plush hedge
#

hmmm... any particular reason I shouldn't be using "direct charges"?

last gull
#

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

plush hedge
#

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?

last gull
#

Sure

plush hedge
#

when instanciating the stripe object make sure to pass the id of the connect account to it (it's StripeConfig param)

last gull
#

Right, that way you're retrieving the objects "as" the connected account

plush hedge
#

yep, that how I was creating the (payment) elements on the client as well

last gull
#

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

plush hedge
#

ok will take your suggestion into considiration (it's not a personal project but for a client)

#

anyway... thanks for the help!

last gull
#

Happy to help!

plush hedge
#

ok, will let them know

#

thanks again for the help!

#

Can I share this thread with them, is this public?

last gull